How to upgrade to Nix 2.5.0

Very much a newb question here. Nix 2.5.0 was just released. I have NixOS 21.11 installed – do I need to upgrade Nix and if so, how?

Nix and Nixpkgs release independently, so it might take some time until
Nix 2.5 even becomes available in Nixpkgs and therefore in NixOS. I
didn’t see any PR on GitHub yet.

Particularly in 21.11 the decision was made to roll back to Nix 2.3. So
without explicitly setting nix.package = pkgs.nix_2_4; you wouldn’t
even get that release during the 21.11 lifetime.

4 Likes