From 4d59f660bc41ba35b1f6df829e8e0b7706b35ee7 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Tue, 10 Sep 2024 21:35:35 +0200 Subject: [PATCH] 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 --- modules/programs/zsh/default.nix | 10 +++++----- 1 file 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"}