mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 10:49:48 +01:00
zsh: source session variables script
This replaces the explicit set within the Z shell `zshenv` file.
This commit is contained in:
parent
803abb58f9
commit
7631921366
1 changed files with 4 additions and 5 deletions
|
@ -11,11 +11,7 @@ let
|
|||
pluginsDir = if cfg.dotDir != null then
|
||||
relToDotDir "plugins" else ".zsh/plugins";
|
||||
|
||||
envVars = cfg.sessionVariables // (
|
||||
if config.home.sessionVariableSetter == "zsh" then config.home.sessionVariables else {}
|
||||
);
|
||||
|
||||
envVarsStr = config.lib.shell.exportAll envVars;
|
||||
envVarsStr = config.lib.shell.exportAll cfg.sessionVariables;
|
||||
|
||||
aliasesStr = concatStringsSep "\n" (
|
||||
mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases
|
||||
|
@ -249,6 +245,9 @@ in
|
|||
|
||||
home.file."${relToDotDir ".zshenv"}".text = ''
|
||||
typeset -U fpath
|
||||
${optionalString (config.home.sessionVariableSetter != "pam") ''
|
||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
''}
|
||||
${envVarsStr}
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue