-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Describe the bug
After #3608 nix-daemon is being sourced from /etc/zshenv instead of /etc/zshrc which leads to system binaries getting priority over ones installed in Nix profile.
Steps To Reproduce
- Install Nix in daemon mode
- Open zsh shell
- Install git
nix-env -iA nixpkgs.git - Run
git - Observe request from the system to download and install Xcode utilities.
Expected behavior
Git should run from Nix.
nix-env --version output
nix-env (Nix) 2.3.7
Additional context
The order of files run by zsh is:
/etc/zshenvand~/.zshenv/etc/zprofileand~/.zprofile/etc/zshrcand~/.zshrc
/etc/zprofile on macOS contains a call to /usr/libexec/path_helper that overrides PATH variable prepending all system paths from /etc/paths file and /etc/paths.d dir. Before #3608 nix-daemon.sh was sourced in /etc/zshrc after this call and Nix paths were in the front of the resulting PATH variable. After #3608 it is sourced in /etc/zshenv which leads to Nix paths ending up in the very end of PATH.
Reactions are currently unavailable