1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00

zsh: source session variables script

This replaces the explicit set within the Z shell `zshenv` file.
This commit is contained in:
Robert Helgesson 2018-01-04 13:32:49 +01:00
parent 803abb58f9
commit 7631921366
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -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}
'';