summaryrefslogtreecommitdiffstats
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
parent20b5f89384085535e7903152fd0d4e5562998837 (diff)
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.
-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 27f4166e1005..073db91b2abb 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}