Reputation: 15492
I can't find nix-env, nix-build, nix-shell etc. on MacOS Catalina.
I installed with:
sh <(curl https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
and was able to run them yesterday. I restarted my computer and can no longer find them. find / -name nix-env | grep nix-env
shows nothing.
I tried installing again with the same command (sh <(curl https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
) but this time it exists immediately with 0 status code.
I suspect I need to do something to mount a virtual drive.
Upvotes: 2
Views: 2055
Reputation: 2061
While Nix (amongst others) installs with bash
newer MacOS do use zsh
instead of bash
.
So you need to update your .zshrc
to source this command from bash, too.
In your terminal start editing with:
sudo nano ~/.zshrc
and add:
source ~/.nix-profile/etc/profile.d/nix.sh
Reload and test with
source ~/.zshrc; nix --version
Upvotes: 0
Reputation: 532
You should follow Notes on the recommended approach.
It looks like the volume is not mounted (check /etc/fstab
state with vifs
as described in documentation).
Upvotes: 1
Reputation: 15492
Use the Disk Utility UI to remove the nix volume (sudo rm -rf /nix
won't work).
Then run the script again and cross fingers your fingers this time: sh <(curl https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
Upvotes: 0