Today I updated my channels with nix-channel --update
and after a reboot I was no longer able to use nix profile
commands, but also not able to upgrade nix
to a newer version.
λ nix profile list
error: profile manifest '/home/mathym/.local/state/nix/profiles/profile/manifest.json' has unsupported version 3
λ nix upgrade-nix --profile /home/mathym/.local/state/nix/profiles/profile
error: profile '/home/mathym/.local/state/nix/profiles/profile' is incompatible with 'nix-env'; please use 'nix profile' instead
error: program '/nix/store/v7gdmdc9yhx3ngh840xx5kr46840s73b-nix-2.18.2/bin/nix-env' failed with exit code 1
λ nix --version
nix (Nix) 2.18.2
What’s the best way to upgrade to a newer version of nix
? I don’t mind backing up the programs installed into my profile and reinstalling them if I can’t update otherwise.