`nix upgrade-nix` fails with mysterious error

When I try to update Nix itself on a non-NixOS system (Linux in this case), I get this error:

$ nix upgrade-nix
error: directory '/home/cv/.nix-profile/bin' does not appear to be part of a Nix profile

Which makes no sense:

$ readlink -q ~/.nix-profile

How much more of a profile can this be?

1 Like