NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.66k stars 1.51k forks source link

Fresh new install is no longer working on ZSH shell #5021

Open pbrilius opened 3 years ago

pbrilius commented 3 years ago

Describe the bug

`Try it! Open a new terminal, and type:

$ nix-shell -p nix-info --run "nix-info -m" `

Steps To Reproduce

  1. Go to Get Started on https://nixos.org/guides/install-nix.html
  2. Execute sh <(curl -L https://nixos.org/nix/install) --daemon
  3. Proceed to installation
  4. Open a new shell, issuing nix-shell -p nix-info --run "nix-info -m" - See error

Expected behavior

It should find the command on ZSH without reprompting for a remuneration.

nix-env --version output

Command 'nix-env' not found, but can be installed with: sudo apt install nix-bin

Additional context

Add any other context about the problem here.

enderger commented 3 years ago

It seems as though the installer is not properly modifying /etc/zshrc. A workaround is to add this to your .zshrc (or /etc/zshrc for the whole system):

source /etc/profile.d/nix.sh
stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info