Gating a NixOS 26.11 Upgrade for Node.js Services in CI

Gating a NixOS 26.11 Upgrade for Node.js Services in CI

pr0h0••30 min read•tech
AI Usage (84%)

This guide shows how to gate a NixOS 26.11 upgrade for Node.js services in CI. The starting point is a Wisevoter report dated 28 November 2026, which claims NixOS 26.11 shipped with the Linux 7.3 kernel. That claim is not enough to act on: a release headline tells you a tarball exists somewhere, but it says nothing about whether your Node.js service builds against the new package set, whether its native addons load, whether the booted kernel behaves, or whether you can get back to the old system at 03:00 when it doesn't.

The gates below sit between that headline and a production host, using a two-lane fixture: the current known-good system as baseline, and the candidate as a pinned second lane. The Node.js service is the artifact under test; the NixOS upgrade is the change being evaluated.

The position, up front: upstream confirmation makes a candidate eligible for testing. Only reproducible builds, booted service evidence, and a rehearsed recovery make it eligible for deployment. Everything below exists to produce that evidence.

⚠️

The report's kernel claim is the part I trust least. I could not confirm a Linux 7.3 mainline series from kernel.org at the time of writing, so I'm treating "NixOS 26.11 ships Linux 7.3" as an unverified secondary claim. If the release is real, read the kernel version off your evaluated configuration — never off an article.

On this page

Gate the NixOS 26.11 upgrade on running Node.js service evidence, not a release headline

Define the acceptance contract: the pinned candidate must build, load native addons, boot its intended kernel, pass service checks, and demonstrate rollback before production promotion

Write the contract before you run anything, because it's the thing you'll be tempted to relax when a gate fails on a Friday. For a Node.js HTTP service on NixOS, a defensible contract has five clauses:

  1. The candidate system closure evaluates and builds from committed inputs, with no network access at build time beyond the pinned substituters and fetchers.
  2. Every native addon the service actually ships loads and executes its real function under the candidate's Node.js runtime and toolchain.
  3. A booted candidate VM reports the kernel version you intended, starts the unit under its production configuration, passes readiness, and serves a real request.
  4. Baseline-versus-candidate behaviour stays inside budgets you set in advance for error rate, latency, throughput, memory, and file descriptors.
  5. The retained baseline closure can be reactivated on a disposable host, and the service passes the same assertions afterwards.

Clause 3 is where most "upgrade checklists" quietly fail: they check the package version, not the booted system.

Establish the source boundary: Wisevoter's report dated 28 November 2026 claims NixOS 26.11 shipped with Linux 7.3; treat both claims as unverified until checked against upstream release documentation and the evaluated configuration

Two distinct claims sit inside that headline, and they fail independently:

  • The release exists. Checkable against NixOS's own announcement index and download page.
  • The kernel is 7.3. Checkable against kernel.org's release listing and, more importantly, against your own boot.kernelPackages.kernel.version.

The supplied seed arrived as a Google News redirect rather than a canonical article URL, so I'm citing it by publisher and date rather than pretending the redirect is a stable primary source. That's a sourcing weakness, not a fatal one — it just means the burden of confirmation sits entirely on upstream documentation and your own evaluation.

Keep the scope on NixOS and Node.js: the source's separate FreeBSD 15.2 final-release-candidate report does not establish a stable release or validate this upgrade path

The seed pairs it with a second Wisevoter item: FreeBSD published a final release candidate for 15.2. A release candidate is not a release. More to the point, it has no bearing on a NixOS upgrade path — different init system, different packaging model, different kernel lineage, different rollback mechanics. Folding the two into one "platform upgrade checklist" produces advice vague enough to apply to nothing. This post stays on NixOS plus Node.js; the FreeBSD item is context about what else was in the news that day, not evidence about your candidate.

Gate 0 — Verify NixOS 26.11 upstream status and record the actual platform

Check official NixOS release information and branch availability before selecting a candidate; stop if the reported release cannot be confirmed rather than inventing release notes or substituting an unstable channel

The failure mode is subtle and common: someone can't find the release, assumes a typo, and switches to nixos-unstable "to get roughly the same thing." That's a different system with different guarantees, and it silently changes the thing under test.

Check the primary sources first:

## What channels/releases does the project actually publish?
curl -fsSL https://nixos.org/download/ | grep -Eo 'NixOS [0-9]+\.[0-9]+' | sort -u

## Channel branch availability (a published channel should appear here)
curl -fsSI https://channels.nixos.org/nixos-26.11/nixexprs.tar.xz | head -n 1

## Kernel release series the upstream kernel project lists
curl -fsSL https://www.kernel.org/ | grep -Eo 'Linux [0-9]+\.[0-9]+' | sort -u | tail -n 5

Illustrative output shape, not a measurement:

NixOS 25.05
NixOS 25.11
HTTP/1.1 404 Not Found

If the release page doesn't list the version and the channel branch 404s, the gate fails closed. You don't write release notes from a news snippet, and you don't substitute a different branch without re-running every gate under a new candidate identity.

Separate distribution version from kernel selection: evaluate the candidate's NixOS release, boot.kernelPackages.kernel.version, Node.js version, architecture, and relevant service configuration

"NixOS 26.11" is a set of package and module definitions. It doesn't imply a kernel — plenty of hosts pin boot.kernelPackages explicitly, and hardware enablement modules or vendor kernels change the answer. Evaluate each dimension separately:

nix eval --raw .#nixosConfigurations.svc.config.system.nixos.version
nix eval --raw .#nixosConfigurations.svc.config.boot.kernelPackages.kernel.version
nix eval --raw .#nixosConfigurations.svc.pkgs.nodejs.version
nix eval --raw .#nixosConfigurations.svc.pkgs.stdenv.hostPlatform.system
nix eval --json .#nixosConfigurations.svc.config.services.openssh.enable

That last one is a placeholder for "whatever service configuration actually matters to you" — swap in your unit definition, firewall rules, or reverse proxy. The point is that the candidate's identity is a tuple, not a version string.

Confirmed versus inferred matters here. Confirmed: what nix eval prints for your configuration. Inferred: that the distribution release implies that kernel. Untested: anything about behaviour on hardware you haven't booted.

Every later gate asserts "the candidate still means the same thing." That assertion is only checkable if you recorded what the candidate was. A minimal manifest:

{
  echo "label: baseline"
  echo "nixpkgs_rev: $(nix eval --raw .#nixpkgs.sourceInfo.rev 2>/dev/null || git -C nixpkgs rev-parse HEAD)"
  echo "flake_lock_sha256: $(sha256sum flake.lock | cut -d' ' -f1)"
  echo "toplevel: $(nix build --no-link --print-out-paths .#nixosConfigurations.svc.config.system.build.toplevel)"
  echo "node: $(nix eval --raw .#nixosConfigurations.svc.pkgs.nodejs.version)"
  echo "kernel: $(nix eval --raw .#nixosConfigurations.svc.config.boot.kernelPackages.kernel.version)"
} | tee manifest-baseline.txt

Store the manifest as a CI artifact next to the lock file. When a gate fails three days later, the manifest is the difference between "the candidate regressed" and "someone bumped a shared input in between."

Build a minimal, reproducible two-lane test fixture for the Node.js service

Define the example Node.js service and its dependencies: an HTTP readiness endpoint, a representative native-addon operation, a disposable state directory, and an isolated database fixture

Keep the fixture small enough that a reviewer can read it in one sitting, and make sure it touches what actually breaks:

  • GET /readyz returns 200 only after the database handle is open and a trivial query succeeds. Readiness that returns 200 before dependencies are usable is worse than no readiness check.
  • One real addon operation — a SQLite write-and-read transaction, a hash, an image resize — executed on the readiness path or a /work endpoint.
  • State in a RuntimeDirectory or StateDirectory path, never in the store, never in the source tree.
  • A database fixture that is genuinely disposable: created at test start, destroyed with the VM.

Map the production-relevant matrix: baseline and candidate on each deployed architecture, with explicit Node.js versions and addon versions rather than floating package aliases

The matrix is where "it worked on my machine" gets caught. If production runs aarch64-linux and CI only builds x86_64-linux, you've tested half the fleet.

LaneSystemNode.jsAddon setPurpose
baselinex86_64-linuxpinned 22.xexact versions from lockreference behaviour
candidatex86_64-linuxcandidate package setsame addon setregression comparison
candidateaarch64-linuxcandidate package setsame addon setcross-arch build + addon load

Name versions explicitly. pkgs.nodejs is an alias that moves; pkgs.nodejs_22 moves slower but still moves; an exact derivation from the candidate's package set is what you actually tested. Record which one you used in the manifest.

Separate execution environments: package builds for dependency reproducibility, booted NixOS VMs for kernel and systemd behavior, and representative hosts for hardware-specific validation

Three environments, three different questions, and none can answer another's:

  • Package builds (sandboxed, no network): does the closure build reproducibly from pins?
  • NixOS VM tests (booted, virtualised): do the kernel, systemd, and unit configuration behave?
  • Representative hardware: do storage drivers, NICs, firmware, and machine-specific boot behave?

A container build tells you nothing about the candidate kernel. A passing VM tells you nothing about your RAID controller. Say both limits out loud in the acceptance table so nobody promotes on the wrong evidence.

Gate 1 — Pin the candidate Nix flake without silently refreshing every input

Show a minimal flake exposing the service package, NixOS configuration, and checks; preserve the baseline lock file and update only the intended nixpkgs input after upstream verification

{
  description = "svc — Node.js service on NixOS";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/<verified-rev>";

  outputs = { self, nixpkgs }:
    let
      systems = [ "x86_64-linux" "aarch64-linux" ];
      forAll = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
    in {
      packages = forAll (pkgs: {
        svc = pkgs.callPackage ./nix/svc.nix { };
      });

      nixosConfigurations.svc = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [ ./nix/configuration.nix ];
      };

      checks = forAll (pkgs: {
        svc-build = self.packages.${pkgs.system}.svc;
        svc-boot = import ./nix/vm-test.nix { inherit pkgs; };
      });
    };
}

Update exactly one input, on a branch, and look at the diff before you build:

git checkout -b upgrade/nixos-candidate
## edit flake.nix: pin nixpkgs.url to the revision confirmed in Gate 0
nix flake lock --update-input nixpkgs    # newer Nix: nix flake update nixpkgs
git diff --stat flake.lock

--update-input is the older spelling; newer Nix accepts nix flake update nixpkgs. Either way, the lock change should touch one node. If it touches five, an input you didn't intend to move moved.

Review the lock-file diff and evaluated package versions: distinguish the requested nixpkgs change from accidental changes to Node.js, service dependencies, modules, or overlays

The lock diff tells you which revisions moved; it doesn't tell you what those revisions contain. Read both:

git diff flake.lock
nix flake metadata --json | jq '.locks.nodes.nixpkgs.locked'
nix eval --json .#nixosConfigurations.svc.pkgs.nodejs.version
nix eval --json .#packages.x86_64-linux.svc.version

A candidate that also drags Node.js from 22 to 24 isn't "the NixOS upgrade" — it's two changes, and if it breaks you won't know which one did it. Split them: land the Node.js bump on the baseline first, get a green run, then upgrade the platform.

Run evaluation and build commands against committed inputs; retain the resolved revisions and closure paths so subsequent gates test the same candidate

Everything downstream should consume a store path printed by this step, not a re-evaluated expression:

nix flake check --no-build
nix build --no-link --print-out-paths .#packages.x86_64-linux.svc
nix build --no-link --print-out-paths .#nixosConfigurations.svc.config.system.build.toplevel
nix path-info -Ssh .#nixosConfigurations.svc.config.system.build.toplevel

Illustrative output shape:

/nix/store/…-svc-1.0.0
/nix/store/…-nixos-system-svc-… 
/nix/store/…-nixos-system-svc-…	  1.9 GiB	  512.3 MiB

Keep those paths in the manifest. Gate 3 and Gate 5 should test the closure you built at Gate 1, not resolve the flake again and get something subtly newer.

Define failure conditions: missing upstream references, dirty source inputs, unexpected dependency drift, unsupported architecture, or evaluation errors block the pipeline

Make the block explicit so it isn't a judgement call at runtime:

  • Upstream release page or channel branch doesn't confirm the version → block.
  • git status --porcelain is non-empty during a CI run (uncommitted flake or lock changes) → block.
  • Lock diff touches inputs other than nixpkgs → block pending review.
  • Node.js, module, or overlay drift between baseline and candidate that you didn't intend → block.
  • Architecture in the matrix has no builder → block; don't silently drop it.
  • Evaluation failure or an infinite recursion / attribute missing error → block.
💪

Treat "we could not evaluate it" as a failure, never as a skip. A skipped gate looks identical to a passing one in most CI UIs.

Gate 2 — Rebuild Node.js dependencies inside the candidate environment

Package the example with a committed npm lock file and a Nix-managed dependency hash; explain that flake.lock and package-lock.json pin different dependency layers

Two lock files, two layers, two failure modes:

  • flake.lock pins the build inputs — nixpkgs, and therefore the Node.js runtime, the C toolchain, libraries like libvips or sqlite.
  • package-lock.json pins the npm graph — your direct and transitive JavaScript dependencies, including the ones that compile native code.

Both must be committed. The Nix side also needs a hash of the npm graph:

{ buildNpmPackage, lib, ... }:
buildNpmPackage {
  pname = "svc";
  version = "1.0.0";
  src = ../.;
  npmDepsHash = "sha256-…";   # regenerate with prefetch-npm-deps
  dontNpmBuild = false;
  meta.mainProgram = "svc";
}

When package-lock.json changes, npmDepsHash changes, and the build fails with a hash mismatch rather than silently resolving something new. That's the behaviour you want:

nix run nixpkgs#prefetch-npm-deps -- package-lock.json

Build production dependencies with the selected Node.js runtime and toolchain; prohibit copying baseline node_modules into the candidate and expose install-script assumptions about network access or prebuilt binaries

The single most common way to fake a passing upgrade test is to copy node_modules from the baseline. It'll often work, which is worse than failing, because it hides the fact that your addons were compiled against the old runtime and old shared libraries.

Nix's sandbox already blocks network access during the build, so install scripts that download prebuilt binaries fail loudly — which is informative. You then either vendor the source build or explicitly allow the prebuilt artifact.

## Wrong: reuses baseline artefacts in the candidate lane
## cp -r baseline/node_modules ./node_modules

## Right: build inside the candidate environment
nix build --no-link --print-out-paths .#packages.x86_64-linux.svc

If an install script needs network access, that's a finding to record, not a gate to loosen. A dependency that reaches out during install is a dependency whose reproducibility you don't control.

Inventory the native addons actually shipped, including transitive dependencies; record process.versions.modules, process.versions.napi, runtime version, architecture, and relevant shared-library dependencies

Inventory what's on disk after the build, not what's in your package.json:

// inventory.js — run with the candidate runtime against the built output
const { execFileSync } = require("node:child_process");
const fs = require("node:fs");
const path = require("node:path");

const root = process.argv[2];
const addons = [];

function walk(dir) {
  for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
    const full = path.join(dir, entry.name);
    if (entry.isDirectory()) walk(full);
    else if (entry.name.endsWith(".node")) addons.push(full);
  }
}

walk(path.join(root, "node_modules"));

console.log(JSON.stringify({
  node: process.version,
  modules: process.versions.modules,   // NODE_MODULE_VERSION (V8/Node ABI)
  napi: process.versions.napi,         // Node-API level
  arch: process.arch,
  platform: process.platform,
  addons: addons.map((file) => ({
    file: path.relative(root, file),
    sharedLibs: (() => {
      try { return execFileSync("ldd", [file], { encoding: "utf8" }).split("\n").filter((l) => l.includes("=>")); }
      catch { return ["ldd failed"]; }
    })(),
  })),
}, null, 2));

Illustrative output shape:

{
  "node": "v22.x.y",
  "modules": "127",
  "napi": "9",
  "arch": "x64",
  "addons": [{ "file": "node_modules/…/build/Release/addon.node", "sharedLibs": ["libsqlite3.so.0 => /nix/store/…"] }]
}

Note the loader path in that output: it points into the store. If it points at /usr/lib, your addon isn't linked the way the candidate expects, and you've found a build problem before it became an incident.

Explain the ABI boundaries precisely: Node-API compatibility does not guarantee compatibility with every external library, while other addons may depend on the Node.js or V8 ABI

Two different stability stories get routinely conflated:

  • Node-API addons are built against a stable C ABI and are intended to survive Node.js major upgrades without recompilation. That's a real guarantee, documented in the Node.js Node-API version matrix.
  • Native-module (NAN / direct V8) addons are compiled against a specific NODE_MODULE_VERSION. Changing the Node.js major version invalidates them, and the failure is a hard load error, not a warning.

But even a Node-API addon pulls in external shared libraries — libsqlite3, libvips, OpenSSL. Those are linked through Nix, and the candidate's package set may resolve them to different versions, or to a library whose SONAME changed. Node-API stability says nothing about that boundary. This is the failure class that "just rebuild and re-run require()" misses entirely.

Execute addon functionality rather than testing require() alone: perform a small database transaction, hash operation, or image transformation appropriate to the real dependency

require("addon") proves the loader found a file and the dynamic linker resolved symbols. It doesn't prove the addon works. Exercise it:

// verify-addon.js — must run under the candidate runtime, in the candidate closure
const Database = require("better-sqlite3");
const fs = require("node:fs");

const dir = process.env.STATE_DIRECTORY || "/tmp";
const db = new Database(`${dir}/verify.sqlite`);
db.exec("CREATE TABLE IF NOT EXISTS t (id INTEGER PRIMARY KEY, v TEXT NOT NULL)");
db.prepare("INSERT INTO t (v) VALUES (?)").run(`v-${Date.now()}`);
const row = db.prepare("SELECT count(*) AS n FROM t").get();
db.close();
fs.unlinkSync(`${dir}/verify.sqlite`);

if (row.n < 1) throw new Error("addon ran but returned no rows");
console.log(JSON.stringify({ ok: true, rows: row.n, modules: process.versions.modules }));

Run it inside the candidate environment, not your shell:

nix shell .#packages.x86_64-linux.svc --command node ./verify-addon.js

Present expected passing output and representative failure signatures for module-version mismatch, unresolved shared libraries, and missing symbols; label illustrative output rather than claiming an unperformed test

The three signatures below are illustrative shapes of well-known error classes. I have not run these against a real NixOS 26.11 candidate — the release claim itself is unverified — so treat them as patterns to grep for, not as observed evidence.

ClassSignature shapeWhat it means
Module version mismatchwas compiled against a different Node.js version using NODE_MODULE_VERSION X. This version of Node.js requires NODE_MODULE_VERSION YAddon built against V8/Node ABI, not Node-API
Unresolved shared libraryerror while loading shared libraries: libsqlite3.so.0: cannot open shared object fileRPATH or dependency missing from the closure
Missing symbolundefined symbol: _ZN2v8…Library present, wrong version or wrong ABI

Passing output shape:

{"ok":true,"rows":1,"modules":"127"}

Gate 3 — Boot the candidate NixOS kernel and exercise the Node.js systemd service

Add a NixOS VM test that boots the evaluated candidate, waits for the service, checks readiness, performs an application request, and records uname -r alongside the configured kernel version

This is the gate that catches what nix build can't see. A NixOS VM test boots a real systemd, a real kernel from your candidate configuration, and your real unit file.

{ pkgs }:
pkgs.nixosTest {
  name = "svc-boot";
  nodes.machine = { config, ... }: {
    imports = [ ./configuration.nix ];
    services.svc.enable = true;
    environment.systemPackages = [ pkgs.curl ];
  };
  testScript = ''
    machine.start()
    machine.wait_for_unit("multi-user.target")
    machine.wait_for_unit("svc.service")
    machine.wait_for_open_port(8080)
    machine.succeed("curl -fsS http://127.0.0.1:8080/readyz")

    booted = machine.succeed("uname -r").strip()
    configured = machine.succeed(
      "cat /run/booted-system/kernel-modules/lib/modules/*/modules.dep >/dev/null; "
      "uname -r"
    ).strip()
    print(f"booted={booted} configured={configured}")

    machine.succeed("curl -fsS -X POST http://127.0.0.1:8080/work")
  '';
}

The uname -r read is the whole point. It ties the claim "the candidate boots kernel X" to a value the running system produced, not to an article or a package expression.

Verify systemd integration under the production unit configuration: service identity, working directory, environment, credential access, writable paths, startup ordering, restart policy, and graceful termination

The VM test should assert the unit's properties, not just its state. Cheap, high-value checks:

machine.succeed("systemctl show -p User -p Group -p WorkingDirectory -p Restart svc.service")
machine.succeed("systemctl show -p Environment svc.service | grep -q NODE_ENV=production")
machine.succeed("test -w /var/lib/svc && echo writable-state-ok")
machine.succeed("journalctl -u svc.service --no-pager | grep -q 'listening'")

Then deliberately break an assumption: stop the database (or the fixture backing it), confirm readiness flips to failing rather than staying green, and confirm the restart policy behaves as configured. Readiness that lies is the most expensive bug class in this entire exercise.

Test the network path the service actually uses: loopback versus external binding, DNS, TLS trust, reverse-proxy forwarding, outbound connections, and local firewall behavior using isolated fixtures

A service that binds 127.0.0.1 in the test but 0.0.0.0 in production has an untested surface. Inside the VM:

  • Request via loopback and via the VM's main address, so binding gets exercised.
  • If a reverse proxy terminates TLS, hit it there and check X-Forwarded-Proto handling.
  • Make one real outbound connection to a fixture endpoint to prove DNS and egress rules; if the service depends on a CA bundle, confirm it resolves inside the store and not from /etc/ssl/certs by accident.
  • Confirm the firewall rules the configuration declares actually allow the intended port and deny the rest.

Exercise shutdown and restart behavior: drain an in-flight request, deliver SIGTERM, check exit status and journal entries, and confirm readiness returns only after dependencies are usable

machine.succeed("curl -fsS --max-time 30 http://127.0.0.1:8080/slow &")  # illustrative in-flight request
machine.succeed("systemctl stop svc.service")
machine.succeed("systemctl show -p ExecMainStatus svc.service | grep -q ExecMainStatus=0")
machine.succeed("journalctl -u svc.service --no-pager | grep -qi 'drained'")
machine.fail("systemctl is-active svc.service")
machine.succeed("systemctl start svc.service")
machine.wait_for_open_port(8080)
machine.succeed("curl -fsS http://127.0.0.1:8080/readyz")

If the unit uses Type=notify, this is also where you find out whether the readiness notification is wired up correctly, because wait_for_unit on its own will pass on an ExecStart-issued notification even if the app isn't ready. Check the app's own endpoint separately.

State the coverage limit: containers cannot establish candidate-kernel compatibility, and a passing VM does not validate production storage drivers, NICs, or machine-specific boot behavior

Be blunt about this in the acceptance table. The VM proves: the candidate closure boots, the unit starts, the kernel version matches, the application serves and shuts down. It doesn't prove: your NVMe driver, your 25GbE NIC, your firmware update path, your hardware watchdog, or your specific bootloader configuration. Those need a representative host, and skipping that step is an accepted risk to record, not a passing gate.

Gate 4 — Detect Node.js service regressions that correctness smoke tests miss

Run a bounded baseline-versus-candidate workload on comparable runners and collect request errors, latency distributions, throughput, memory usage, and file-descriptor behavior

Functional tests say "it works." They don't say "it works as fast, with the same memory profile, without leaking sockets." A bounded, fixed-duration comparison closes that gap:

// load.js — fixed duration, fixed concurrency, percentile output
const http = require("node:http");
const { performance } = require("node:perf_hooks");

const URL = process.argv[2];
const CONCURRENCY = Number(process.argv[3] || 16);
const DURATION_MS = Number(process.argv[4] || 30000);

const latencies = [];
let errors = 0;
let inFlight = 0;
const stopAt = performance.now() + DURATION_MS;

function once() {
  if (performance.now() >= stopAt) return;
  inFlight++;
  const started = performance.now();
  const req = http.get(URL, (res) => {
    res.resume();
    res.on("end", () => {
      if (res.statusCode !== 200) errors++;
      latencies.push(performance.now() - started);
      inFlight--;
      once();
    });
  });
  req.on("error", () => { errors++; inFlight--; once(); });
}

for (let i = 0; i < CONCURRENCY; i++) once();

process.on("beforeExit", () => {
  latencies.sort((a, b) => a - b);
  const p = (q) => latencies[Math.min(latencies.length - 1, Math.floor(q * latencies.length))] ?? null;
  console.log(JSON.stringify({
    requests: latencies.length, errors,
    p50: p(0.5), p95: p(0.95), p99: p(0.99),
    rss: process.memoryUsage().rss,
  }));
});

Run the identical script against both lanes on comparable runners, and record the parameters alongside the result.

Set service-specific budgets before running the comparison; distinguish repeatable regressions from runner noise and avoid presenting arbitrary thresholds as universal release criteria

A budget is service-specific and should come from your own history, not from a blog post. The mechanics matter more than the numbers: run each lane at least three times, compare medians rather than single runs, and treat a difference smaller than your observed run-to-run spread as noise.

MetricBudget sourceBlocks promotion if
Error ratemust be zero on the fixture workloadany non-2xx response
p95 latencybaseline median p95 + your measured noise bandcandidate exceeds band on 3 of 3 runs
Throughputbaseline median req/scandidate drops beyond band
RSS at steady statebaseline + headroom you already operate withcandidate grows without plateau
Open FDsflat after warm-upcandidate grows monotonically

I'm deliberately not filling in percentages. Any number I invent here would be an arbitrary threshold dressed up as a release criterion.

Preserve failed-request samples, journals, runtime metadata, and workload parameters together so a failure can be traced to the exact system closure

A regression you can't attribute is a regression you'll re-litigate next quarter. The artifact bundle should contain: the load parameters, the raw result JSON for every run, the systemd journal for both lanes, nix path-info for both closures, and the manifest from Gate 0. If a p99 spike can't be tied to a specific closure path, the investigation restarts from zero.

Gate 5 — Prove rollback with running software and compatible data

Retain the known-good closure and boot generation as explicit deployment prerequisites; explain why a lock-file revert alone does not restore a running host

Reverting flake.lock and running nixos-rebuild switch builds a new system from old inputs. That's usually equivalent, but it isn't the artefact you validated, and it doesn't help at all if the build is now broken or the machine is degraded. Rollback means reactivating a retained closure:

nix-env --list-generations --profile /nix/var/nix/profiles/system
nix path-info -r /nix/var/nix/profiles/system-<N>-link

Record the generation number and the closure path in the manifest. Both are prerequisites for promotion, not afterthoughts.

On a disposable VM, deploy the candidate, exercise the service, reactivate the retained baseline, and rerun the same readiness and functional assertions

Rehearse the actual sequence on a disposable VM, with the same assertions as Gate 3:

## after deploying the candidate and confirming readiness
nixos-rebuild switch --rollback    # or: /nix/var/nix/profiles/system-<N>-link/bin/switch-to-configuration switch
curl -fsS http://127.0.0.1:8080/readyz
curl -fsS -X POST http://127.0.0.1:8080/work
systemctl is-active svc.service

Two details people miss: the live switch does not change the running kernel, and it doesn't necessarily restore the previous process environment if the unit file was reloaded rather than restarted. Assert the application behaviour, not just the system state.

Validate reboot rollback separately: boot the selected known-good generation and verify the active kernel, service runtime, and application behavior rather than assuming a live switch replaced the kernel

/nix/var/nix/profiles/system-<N>-link/bin/switch-to-configuration boot
systemctl reboot
## after the host returns
uname -r
systemctl show -p ExecStart svc.service
curl -fsS http://127.0.0.1:8080/readyz

The uname -r check isn't ceremony. If you only ever test live rollback, you've never tested the kernel half of your recovery plan — which is precisely the half a kernel-version upgrade puts at risk.

Test the data boundary independently: NixOS generations do not restore database schemas, application state, secrets, or external services; require backward-compatible migrations or a separately verified restore procedure

This is the failure that turns a 10-minute rollback into an outage. A generation restores a system closure. It restores nothing about your Postgres schema, your queue contents, your object storage, or your secrets rotation state.

Rules that hold up under pressure:

  • Every migration shipped with the candidate must be backward compatible with the retained baseline for at least the rollback window — additive columns and tables, no destructive renames, no NOT NULL without defaults on populated tables.
  • Alternatively, a verified restore procedure exists, has been executed in the last quarter, and has a documented RPO you accept.
  • Anything outside the system closure — external services, DNS, certificates, third-party APIs — is out of scope for "rollback" and must be stated as such in the runbook.

If you can't say which of these applies, the rollback gate isn't passed; it's untested.

Protect rollback inputs from garbage collection for the agreed retention window and verify recovery access outside the application's normal network path

A rollback target that got garbage-collected isn't a rollback target. If automatic GC is enabled on the host, pin the baseline closure as a GC root and keep the generation:

nix-store --add-root /nix/var/nix/gcroots/rollback-baseline --indirect -r /nix/var/nix/profiles/system-<N>-link
nix-store --query --roots /nix/var/nix/profiles/system-<N>-link

Then verify recovery access by a path that doesn't depend on the application being healthy — an out-of-band console, a bastion, or an alternate management network. Recovery tooling that lives behind the service you're recovering is a single point of failure with a friendly UI.

Assemble the gates into a reviewable CI pipeline

Show a provider-neutral job graph: source verification, evaluation, package builds, addon tests, booted integration tests, regression checks, rollback rehearsal, and artifact publication

verify-upstream        (fetch release page, channel branch, kernel listing)
  └─ evaluate          (nix flake check --no-build, manifest generation)
       └─ build        (package + toplevel; prints closure paths)
            ├─ addon-tests   (candidate runtime, real addon operations)
            ├─ vm-tests      (booted candidate, systemd, network, shutdown)
            ├─ regression    (baseline vs candidate, 3 runs each)
            └─ rollback      (deploy candidate → reactivate baseline → assert)
                 └─ publish (manifest, closures, journals, load results)

Each job consumes the closure path produced by build. Nothing re-resolves the flake downstream.

Separate untrusted pull-request execution from deployment privileges; restrict secrets, use trusted build infrastructure, and treat binary-cache signing authority as a deployment-sensitive capability

A pull request can change flake.nix, which means a pull request can change what gets built and, if you're careless, what gets pushed to your binary cache. Practical separation:

  • PR jobs run nix build and tests with no cache-write credentials and no deployment secrets.
  • Cache-push happens only on trusted branches, after review, on infrastructure you control.
  • Signing keys for the binary cache are deployment credentials, not build conveniences. A key that can sign arbitrary store paths is a key that can hand your fleet a substituted closure.
  • nix.settings.trusted-public-keys on hosts is a security boundary; changes to it deserve the same review as a firewall change.

Publish an acceptance table mapping each gate to its command or test, required evidence, pass condition, and blocking failure; include illustrative pass and fail summaries without fabricated measurements

GateCommand / testEvidencePass conditionBlocks on
0 Upstreamrelease page + channel HEAD + kernel listingURLs, HTTP status, manifestcandidate version confirmed upstream404 or version absent
1 Pinnix flake lock --update-input nixpkgs, nix flake checklock diff, evaluated versionsone input moved, no unintended driftextra input drift, dirty tree
2 Addonsnix build, node verify-addon.jsaddon inventory JSON, ldd outputall addons load and executemismatch, missing lib/symbol
3 BootnixosTest boot testuname -r, journal, readiness responsekernel matches config, service serveskernel mismatch, unit failure
4 Regressionload harness, 3× per laneresult JSON, journals, closureswithin pre-set budgetserror rate > 0, repeatable regression
5 Rollbacklive + reboot rollback rehearsalgeneration list, post-rollback assertionsbaseline serves after switch and rebootfailed switch, failed assertions, GC'd target
Datamigration check or restore drillmigration diff, drill timestampbackward compatible or restore verifieddestructive migration, unverified restore

Illustrative summaries — shape only, no measurements claimed:

gate0 verify-upstream     PASS  version confirmed, branch present
gate1 pin                 PASS  inputs changed: nixpkgs (1)
gate2 addons              PASS  3 addons, 0 shared-lib errors
gate3 boot                PASS  booted=… configured=… service ready
gate4 regression          FAIL  errors=0 p95 within band, RSS grew monotonically
gate5 rollback            PASS  baseline active after reboot, assertions green
result: BLOCKED by gate4

Promote the tested system closure rather than resolving dependencies again during deployment; require a new gate run whenever the lock file, service package, or host configuration changes

Deployment should be a copy plus an activation, nothing more:

nix copy --to ssh-ng://prod-host /nix/store/…-nixos-system-svc-…
ssh prod-host /nix/store/…-nixos-system-svc-…/bin/switch-to-configuration switch

If deployment resolves the flake again, you deployed something you didn't test. And if the lock file, the service derivation, or the host configuration changes after a green run, the run is stale — re-run the gates rather than reasoning about whether the diff "should" matter.

Roll out the NixOS upgrade through a canary with explicit stop conditions

Deploy to a representative host, confirm the booted kernel and closure identity, and observe workload-specific error, latency, and resource budgets before expanding the rollout

One host, then observe:

uname -r
readlink -f /run/current-system
systemctl show -p ExecStart svc.service

Compare the closure path and kernel against the manifest. Then watch the same budgets you set in Gate 4, at production volume, for a defined window. Expand only if error rate, latency, and resource use stay inside them.

Define who can halt promotion, how the retained generation is selected, and which data-compatibility failures require restore rather than a system-only rollback

Write these down before the canary, not during it:

  • Who can halt. A named role with authority to stop the rollout without seeking consensus. Ambiguity here converts a small incident into a large one.
  • How rollback is selected. By generation number and closure path from the manifest — not by "the previous one" picked under pressure.
  • When a system rollback is insufficient. Any schema change the baseline binary can't read, any destructive migration, any external state written in the candidate's format. Those require the restore procedure, not switch-to-configuration.

Close with the technical position: upstream confirmation makes the candidate eligible for testing, but reproducible builds, booted service evidence, and demonstrated recovery make it eligible for deployment

For this specific case: the 28 November 2026 Wisevoter report gives you a version string and a kernel claim. Neither is evidence. If NixOS 26.11 is real, the release announcement and the channel branch will say so, and nix eval on your own configuration will tell you what kernel you're actually getting — which is the only kernel version that matters. The Linux 7.3 detail remains unconfirmed here and should stay labelled that way until you read it off a booted system.

The gates aren't bureaucracy; they're the difference between finding an addon ABI break in a VM test and finding it on a production node at peak traffic. Build the fixture once, run it every time the lock file moves, and promote closures rather than intentions.

Further Reading and Verification Sources

The seed for this post was a Wisevoter item dated 28 November 2026 headlined "NixOS Releases 26.11 With Linux 7.3 Kernel," supplied as a Google News redirect rather than a canonical article URL. It's cited here as a secondary claim only. I've deliberately not linked an "official NixOS 26.11 release notes" page, because I couldn't verify one exists — linking a guessed URL would manufacture the confirmation this whole post argues against.

Check these primaries yourself, and only cite the release documentation once it resolves:

Nix and NixOS

Node.js

Addons and systemd

  • better-sqlite3 — used as the example addon; check its own docs for whether your pinned version targets Node-API or the V8 ABI
  • sharp — the other common addon that pulls in external shared libraries
  • sd_notify — readiness notification semantics for Type=notify units

Share this post

More posts

Loading comments…