summaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2024-09-10 21:35:35 +0200
committerAntoine Cotten <hello@acotten.com>2024-09-10 21:35:35 +0200
commit4d59f660bc41ba35b1f6df829e8e0b7706b35ee7 (patch)
tree561cecf9e85677e2430adb7a307b9372b2949ec5 /modules/programs
parent5b2d8e9a47c3e17514650d1ce7d5e907114db82b (diff)
zsh: move fpath init from /etc/zshrc to /etc/zshenv
We want these to be set even when /etc/zshrc loading is disabled. NixOS/nixpkgs@f70e3f3738300ef1e94737c09364cd176893858f
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/zsh/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/programs/zsh/default.nix b/modules/programs/zsh/default.nix
index bbf8ad9..15d5ba7 100644
--- a/modules/programs/zsh/default.nix
+++ b/modules/programs/zsh/default.nix
@@ -135,6 +135,11 @@ in
. ${config.system.build.setEnvironment}
fi
+ # 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
+
${cfg.shellInit}
# Read system-wide modifications.
@@ -182,11 +187,6 @@ in
${config.environment.interactiveShellInit}
${cfg.interactiveShellInit}
- # 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
-
${cfg.promptInit}
${optionalString cfg.enableGlobalCompInit "autoload -U compinit && compinit"}