The first time installing with
curl https://nixos.org/nix/install | sh works fine (asks for
sudo), but if we run it a second time it will fail with permission denied when trying to access
/nix and it doesn’t prompt for
sudo in the second case.
I was trying to start from scratch, to see if I could avoid the duplicate search issue, so I delete all
~/.nix-* folders and tried the
curl command again, then got permission denied.
I deleted the
/nix folder then I was able to try again successfully.
Maybe a better error message should be thrown in this case, or maybe it should just ask for
sudo again and do what it needs to do?