From 6c9d93a2c836941987dfd48427bcb456b3ae33b5 Mon Sep 17 00:00:00 2001 From: Spotlight Date: Sun, 10 Sep 2023 21:38:38 -0500 Subject: [PATCH] Add in Nix daemon default source This (hopefully?) fixes woes with non-interactive shells under Gentoo. --- home/prompt.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/prompt.nix b/home/prompt.nix index 87aec7c..6654749 100644 --- a/home/prompt.nix +++ b/home/prompt.nix @@ -62,4 +62,14 @@ in { # We'd like to have the iTerm2 shell integration utilities in ~/.iterm2. home.file.".iterm2".source = "${iterm2_shell_integration}/utilities"; + + # We'd also like to have Nix sourced by default within .zshenv, as + # non-interactive shells don't always source ~/.zprofile or similar. + programs.zsh.envExtra = '' + # 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 + ''; } \ No newline at end of file