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
+11
View File
@@ -362,6 +362,17 @@ pkgs.testers.runNixOSTest {
assert "up to date" in out, out
target.succeed("test ! -e /var/lib/router/upgrade/preview.json")
with subtest("the stable releases the channel server has are listed, and a missing one is not"):
client.succeed("mkdir -p /srv/channels/files/nixos-26.11 && printf %s " + running_rev + " > /srv/channels/files/nixos-26.11/git-revision")
out = target.succeed("router-upgrade releases 2>&1")
listed = json.loads(target.succeed("cat /var/lib/router/upgrade/releases.json"))
assert listed["releases"] == ["26.05", "26.11"], (out, listed)
client.succeed("rm -r /srv/channels/files/nixos-26.11")
target.succeed("router-upgrade check >/dev/null 2>&1") # asks again
listed = json.loads(target.succeed("cat /var/lib/router/upgrade/releases.json"))
assert listed["releases"] == ["26.05"], listed
target.succeed("systemctl cat router-upgrade-notice.timer | grep -q daily")
with subtest("a preview lists the changes and the download without fetching or touching anything"):
before = current()
out = target.succeed("router-upgrade preview --force 2>&1")