1

I am trying to install nix on my local iMac. I am following the following Guide to do that. After executing

sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume

I get "Installing finished!" and I am requested to add the line:

. /Users/joeblogs/.nix-profile/etc/profile.d/nix.sh

"to your shell profile (e.g. ~/.profile)."

I am using a Mac (with zsh) and so what file is this shell profile referring to? For instance, i do not have a ~/.profile.

1
  • You'd have an easier time installing on a Linux machine. Try Linux mint. Jul 25 at 13:26
0

I had the same problem. Try creating a file named .bash_profile in your user directory (/Users/joblogs/.bash_profile) and add the given line as it is written. Restart the terminal and give it a go.

1
  • this does't work, maybe because i am using zsh
    – codeasasin
    Jul 24 at 7:11
0

So the following worked. Go to the following file:

/etc/zprofile

and add the following line:

. /Users/thanhdanhphan/.nix-profile/etc/profile.d/nix.sh

Close all your terminals and re-open a new one, try:

nix --version

and it should give you the latest nix version e.g (at the time of writing):

nix (Nix) 2.3.14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.