Say when a newer NixOS release is out

router-upgrade releases asks the channel server which stable releases exist
(daily timer, and on every check). The Overview and Packages pages tell a
router that follows a stable release when a newer one is out, and offer the
newest two releases as channels instead of a fixed list.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 22:10:27 +01:00
co-authored by Claude Sonnet 5.5
parent 2e4a596fdc
commit 048b53fe33
9 changed files with 241 additions and 27 deletions
@@ -22,6 +22,9 @@
</div>
</section>
{{end}}
{{with .Data.NewRelease}}
<section class="notice"><p>NixOS {{.}} is out. <a href="/upgrade">See what it would change</a>.</p></section>
{{end}}
<div id="dashboard" data-range="{{.Data.Dashboard.Range}}" data-interval="{{.Data.Dashboard.Interval}}">
{{template "dashboard" .}}
+14
View File
@@ -18,11 +18,25 @@
</label>
<button class="secondary">Save</button>
</form>
{{if $d.ReleasesSeen}}<p class="hint">Stable releases as the channel server listed them on {{$d.ReleasesSeen}}; Check for upgrades asks again.</p>{{end}}
<p class="hint">The channel only chooses what an upgrade offers; saving it changes nothing on the router. Going back to an older release
(unstable to 26.05) is refused unless you tick "downgrade anyway" when previewing; state written by the newer
release may not work with the older one.</p>
</section>
{{with $d.NewerRelease}}
<section class="notice">
<h2>NixOS {{.}} is out</h2>
<p>You follow {{$d.Channel}}. {{.}} is the newer stable release: switch the channel to it, then look for upgrades and
preview what would change. Nothing is installed until you upgrade, and NixOS cannot go back to the older release afterwards.</p>
<form method="post" action="/upgrade/channel" class="actions">
<input type="hidden" name="csrf" value="{{$.CSRF}}">
<input type="hidden" name="channel" value="{{.}}">
<button class="secondary">Follow {{.}}</button>
</form>
</section>
{{end}}
{{if $d.Updating}}
<section class="busy"><h2>Updating…</h2><p>The router is installing a new version of nixos-router.</p></section>
{{else if $d.Run.Running}}