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
+3 -1
View File
@@ -224,7 +224,9 @@ verity. The image module and its test (`checks.image`) stay as they are for anyo
## Package upgrades (`router-upgrade`, 2026-11-08)
Upgrading nixpkgs (the kernel and every package) on the router, without a new release of nixos-router. Step 1 (CLI and setting) and step 2 (web UI page) are done; the notice of a new NixOS release follows.
Upgrading nixpkgs (the kernel and every package) on the router, without a new release of nixos-router. Step 1 (CLI and setting) and step 2 (web UI page) and step 3 (the notice of a new NixOS release) are done.
- **Releases** (`router-upgrade releases`, daily timer `router-upgrade-notice`, and every `check`): asks the channel server whether `nixos-YY.05` and `nixos-YY.11` exist (last year to next year; 200 = exists, 404 = not yet) and writes `/var/lib/router/upgrade/releases.json`. With no answer at all (no internet) the file is left as it was. The web UI offers the newest two as channels (the built-in list until the file exists), says on the Overview and the Packages page when a stable release newer than the followed one is out (only when a stable release is followed: unstable has no newer one), and has a button that follows it (saving the channel changes nothing on the router). Not done: a note that a release is not tested with this version of nixos-router.
- **Setting** `router.update.channel`: `unstable` or a release like `26.05` (branch `nixos-26.05`); null: the packages that came with the installed release. Read from the saved `settings.json` when upgrading; applying settings does not change nixpkgs.
- **`router-upgrade check`**: the branch's newest revision from `<channels.nixos.org>/<branch>/git-revision` (a redirect to releases.nixos.org, so curl follows it; the last revision Hydra's tests passed), against the running one (`nixos-version --revision`). Writes `/var/lib/router/upgrade/check.json`.