Nix path doesn't add itself in zshrc
Platform
- [ ] Linux:
- [x] macOS
- [ ] WSL
Additional information
Nix is not in the path after i install nix even though /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh file exists
also Nix configuration is correctly added to the shell initialization files
cat /etc/zshrc /etc/bashrc /etc/bash.bashrc | grep 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'
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'
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'
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'
output
Priorities
Add :+1: to issues you find important.
Nix not being on PATH generally points to your shell init files either hard-setting a PATH that doesn't include Nix after Nix's shell hook ran (often from one of the user-specific init files in ~/), or perhaps having an early return condition in the relevant init file that is keeping the shell hook from running at all.
If env | grep NIX shows a few variables, that's a good sign the shell hook is at least running and you can focus on looking for what might be overwriting PATH.