Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nixos installation issue,'command not found: nix'

Tags:

nix

nixos

I deleted /nix and started a fresh install of nix, however after installing nix install nix (MACBook Pro M1 arm64 BigSur) with sh <(curl -L https://nixos.org/nix/install) I run $ nix but I get the output zsh: command not found: nix , same for nix-shellalso the /nix volume is not created, I also tried the instruction at https://docs.plutus-community.com/docs/setup/MacOS.html still same issue

like image 860
ykel Avatar asked Nov 21 '25 08:11

ykel


1 Answers

  1. Open /etc/zshrc and look for the following lines (probably at the end of the file):

     # Nix
     if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
        . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
     fi
     # End Nix
    
  2. Copy these lines and delete them from this file.

  3. Open ~/.zshrc and add the above copied lines to the end of this file

  4. Reboot terminal and nix should work now.

like image 94
lajosdeme Avatar answered Nov 22 '25 22:11

lajosdeme



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!