Problem upgrading NixOS 22.05 -> 22.11

Hello, I’m trying to upgrade my NixOS system from 22.05 to 22.11, but it’s not happening. Here is what I do:

  1. In configuration.nix, update = (also: enable = true; allowReboot = false;)
  2. run nix-channel --add nixos
  3. run nixos-rebuild switch --upgrade
  4. reboot for good measure

After rebooting, Neofetch shows the system to be unchanged:

OS: NixOS 22.05 (Quokka) x86_64
Kernel: 5.15.83
DE: GNOME 42.4

Am I missing a step here?

I believe this option is supposed to be set to a channel url, not a floating point number. If you know that and just didn’t want to type the full thing, that’s fine, but maybe indicate that more clearly with something like ... next time?

Did the nixos-rebuild command actually succeed? Did you run it as root?

Most importantly, did you run the nix-channel command as root? If you run it as your user it doesnt complain, but affects your user channels instead of root’s channels (which is what nixos-rebuild will be using).

Check both nix-channel --list and sudo nix-channel --list and see what they say.

1 Like

Thanks, I didn’t run the channel add command as root, root channel was still set to 22.05. Rebuilding now, that should fix it.

I had the channel url set correctly in configuration.nix, just accidentally abbreviated it in my original post. Fixed.

Thank you!

1 Like