Confused now that unstable has been removed

I recently re-installed NixOS. Then I I wanted to switch to the unstable channel, so as root I did…

nix-channel --add https://channels.nixos.org/nixos-unstable nixos

…which is still the procedure, according to the unstable version of the manual. Then I get the error message:

error: nixUnstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest.

So if I want to use nixVersions.latest, what do I put in the nix-channel command? Or is there a different procedure now? I looked at the channels in https://channels.nixos.org/ and the closest thing I saw was nix-latest, so I tried

nix-channel --add https://channels.nixos.org/nix-latest nixos

but when I did nixos-rebuild I got a 404 error. Then I noticed that the subdirectory had a different URL, and I tried that:

nix-channel --add https://channels.nixos.org/?prefix=nix-latest nixos

but that gave:

unpacking channels...
error: failed to open archive: Unrecognized archive format
error: builder for '/nix/store/spddpqx3njg5yhv6dfh0m6dhl95mzl57-nixos.drv' failed with exit code 1
error: program '/nix/store/fyzvvbx77lr62qjdyp89y0nyqlmmqddr-nix-2.18.4/bin/nix-env' failed with exit code 100

What do I do now?

Do you get that error message on rebuild? It should never, ever appear upon nix-channel --add.

The fix is to update your nix.package setting.

3 Likes