Skip to content

Package Channels

Every machine has both nixpkgs releases available at the same time: the current unstable channel and the latest stable one. One of them is the default — the release a plain package name resolves to — and the other stays reachable for individual packages.

Put stable. or unstable. in front of a package to take just that one from the named release. A bare package name comes from the default channel, so you only need the prefix for the exceptions.

system/software/datascience.nix
environment.systemPackages = with pkgs; [
stable.rstudio # broken on unstable, see upstream issue
];

The reverse works too:

system/software/development.nix
environment.systemPackages = with pkgs; [
unstable.claude-code # follow frequent updates
];

The default is chosen in flake.nix by pointing nixpkgs at one of the two releases. Change that line to move the whole configuration — every host and the supporting inputs (disko, sops-nix, and the rest) follow along.

nixpkgs.follows = "nixpkgs-stable"; # was: nixpkgs-unstable
nixpkgs-stable.url = "github:NixOS/nixpkgs?ref=nixos-26.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable";

Home Manager is pinned the same way. Point home-manager at the release that pairs with your channel:

home-manager.follows = "home-manager-stable"; # was: home-manager-unstable
home-manager-stable.url = "github:nix-community/home-manager?ref=release-26.05";
home-manager-unstable.url = "github:nix-community/home-manager";

Then refresh the lock file and rebuild:

Terminal window
nix flake lock
nixos-rebuild switch --sudo --flake