summary refs log tree commit diff
path: root/nixos/modules/programs/zsh/zsh.nix
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2019-08-24 05:36:02 +0000
committerJan Malakhovski <oxij@oxij.org>2019-08-24 05:36:02 +0000
commitf70e3f3738300ef1e94737c09364cd176893858f (patch)
tree147d2c24a5774a19794646d3236a34246c2e6a06 /nixos/modules/programs/zsh/zsh.nix
parent20b5f89384085535e7903152fd0d4e5562998837 (diff)
downloadnixpkgs-f70e3f3738300ef1e94737c09364cd176893858f.tar
nixpkgs-f70e3f3738300ef1e94737c09364cd176893858f.tar.gz
nixpkgs-f70e3f3738300ef1e94737c09364cd176893858f.tar.bz2
nixpkgs-f70e3f3738300ef1e94737c09364cd176893858f.tar.lz
nixpkgs-f70e3f3738300ef1e94737c09364cd176893858f.tar.xz
nixpkgs-f70e3f3738300ef1e94737c09364cd176893858f.tar.zst
nixpkgs-f70e3f3738300ef1e94737c09364cd176893858f.zip
nixos: zsh: move NixOS-specific variables from /etc/zshrc to /etc/zshenv
We want these to be set even when /etc/zshrc loading is disabled.
Diffstat (limited to 'nixos/modules/programs/zsh/zsh.nix')
-rw-r--r--nixos/modules/programs/zsh/zsh.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index 27f4166e100..073db91b2ab 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -147,6 +147,13 @@ in
             . ${config.system.build.setEnvironment}
         fi
 
+        HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
+
+        # Tell zsh how to find installed completions
+        for p in ''${(z)NIX_PROFILES}; do
+            fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
+        done
+
         ${cfge.shellInit}
 
         ${cfg.shellInit}
@@ -192,13 +199,6 @@ in
         HISTSIZE=${toString cfg.histSize}
         HISTFILE=${cfg.histFile}
 
-        HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
-
-        # Tell zsh how to find installed completions
-        for p in ''${(z)NIX_PROFILES}; do
-            fpath+=($p/share/zsh/site-functions $p/share/zsh/$ZSH_VERSION/functions $p/share/zsh/vendor-completions)
-        done
-
         ${optionalString cfg.enableGlobalCompInit "autoload -U compinit && compinit"}
 
         ${cfge.interactiveShellInit}