Upgrading to NixOS 26.05: A Rocky Road
NixOS 26.05 dropped yesterday. I upgraded — it did not go smoothly. Here’s what broke and how I fixed it.
Step 1: Update Channels
NixOS uses channels to track package versions. Two channels need updating: the OS itself and home-manager (if you use it).
sudo nix-channel --add https://nixos.org/channels/nixos-26.05 nixos
sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-26.05.tar.gz home-manager
sudo nix-channel --update
sudo nixos-rebuild switch
Before the upgrade, my channels were:
home-manager https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz
nixos https://nixos.org/channels/nixos-25.11
Note: Do not change stateVersion in your config. It reflects the NixOS version at first install, not the current channel.
Step 2: The First Rebuild — System Freeze
The first nixos-rebuild switch froze my machine entirely. Hard reboot required. No idea why — likely a race condition during live switching with a large number of derivations building simultaneously, or a GPU driver issue during system activation. It didn’t happen again on subsequent runs.
Step 3: The Second Rebuild — VSCodium Extension Build Failure
After rebooting and running nixos-rebuild switch again, I hit this cascade of errors:
error: Cannot build '...-vscode-extension-anthropic-claude-code-2.1.148.drv'.
Reason: builder failed with exit code 127.
Exit code 127 means “command not found” in the build sandbox. The anthropic.claude-code VSCode extension derivation was broken in 26.05.
At the same time, there was an evaluation warning I had been ignoring:
evaluation warning: paul profile: programs.vscode.package is set to a known VSCode fork (pname: "vscodium"),
but programs.vscode now always writes to Visual Studio Code's paths
(e.g. ~/.vscode, "Code/User"). Use programs.vscodium instead so that
configuration is written to the fork's own paths.
The fix was two changes to common/home.nix:
- Rename
programs.vscodetoprograms.vscodium(and drop the redundantpackage = pkgs.vscodium— it’s the default forprograms.vscodium). - Remove
anthropic.claude-codefrom the extensions list. The extension build was broken, and I already had the Claude Code CLI installed as a system package viaunstable.claude-codeanyway.
# Before
programs.vscode = {
enable = true;
package = pkgs.vscodium;
profiles.default.extensions = with pkgs.vscode-extensions; [
anthropic.claude-code
# ...
];
};
# After
programs.vscodium = {
enable = true;
profiles.default.extensions = with pkgs.vscode-extensions; [
# anthropic.claude-code -- removed, broken in 26.05
# ...
];
};
Step 4: The Third Rebuild — systemd-boot Failure
Fixed the extension, ran rebuild again. New error:
substituteStream() in derivation systemd-boot: ERROR: pattern @bootMountPoint@ doesn't match anything in file
error: Cannot build '...-systemd-boot.drv'. Reason: builder failed with exit code 1.
This looked like a nixpkgs 26.05 packaging bug — the systemd-boot derivation trying to substitute a placeholder (@bootMountPoint@) that no longer exists in the binary. I searched for it and found nothing: no open issues, no Discourse posts. The error format itself (substituteStream) is from an old nixpkgs mechanism that was replaced in early 2025.
The actual cause was likely stale .drv files from the 25.11 channel mixed with the fresh 26.05 evaluation. The fix:
sudo nix-collect-garbage
sudo nix-channel --update
sudo nixos-rebuild switch
That was it. Garbage collect cleared the stale derivations, and the rebuild proceeded.
Step 5: Success — Mostly
The rebuild is now running cleanly. One thing to expect: LibreOffice builds from source. NixOS 26.05 was released yesterday, and Hydra (the NixOS build farm) hasn’t finished compiling all packages yet. LibreOffice is one of the longest builds in nixpkgs (~2-3 hours). The source tarballs are cached, but the compiled binary isn’t available yet. Give it a day and subsequent builds will pull a pre-built binary from the cache.
Tip: skip large source builds on upgrade day. If you don’t need a package immediately, comment it out before rebuilding:
# libreoffice-fresh # uncomment once Hydra has binary cache
After commenting out LibreOffice, the rebuild completed almost instantly — everything else was already cached. Uncomment and rebuild in a day or two once Hydra catches up.
Summary
| Problem | Cause | Fix |
|---|---|---|
| System freeze on first rebuild | Unknown (race condition / GPU driver?) | Reboot, try again |
claude-code extension build failure (exit 127) |
Broken derivation in 26.05 | Remove extension; use CLI package instead |
programs.vscode warning |
Module renamed for VSCodium forks | Switch to programs.vscodium |
systemd-boot @bootMountPoint@ failure |
Stale .drv files from 25.11 |
nix-collect-garbage + retry |
| LibreOffice building from source | Hydra not done building 26.05 binaries yet | Comment out, rebuild instantly, uncomment in a day |
The upgrade took a few attempts but nothing required rolling back. NixOS’s atomic upgrades mean you can keep retrying without breaking anything — previous generations are always there in the boot menu if something goes wrong.