diff options
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/zsh/default.nix b/zsh/default.nix index b89dea7..a2073e7 100644 --- a/zsh/default.nix +++ b/zsh/default.nix @@ -7,8 +7,13 @@ zshrc = pkgs.writeTextDir ".zshrc" '' # Import before anything else, so that we have the full PATH available for - # everything following - . /etc/profile.d/nix-daemon.sh + # everything following. We prefer a global install (via the system's actual + # package manager) to using nix in the nix profile. + if [ -f /etc/profile.d/nix-daemon.sh ]; then + . /etc/profile.d/nix-daemon.sh + elif [ -f "$HOME"/.nix-profile/etc/profile.d/nix-daemon.sh ]; then + . "$HOME"/.nix-profile/etc/profile.d/nix-daemon.sh + fi # oh-my-zsh export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh |