1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 18:59:47 +01:00

zsh: use shell library

This commit is contained in:
Robert Helgesson 2018-01-04 12:22:35 +01:00
parent 026375da49
commit 2fc1b9b5e0
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -11,17 +11,11 @@ let
pluginsDir = if cfg.dotDir != null then
relToDotDir "plugins" else ".zsh/plugins";
export = n: v: "export ${n}=\"${toString v}\"";
toEnvVarsStr = vars: concatStringsSep "\n" (
mapAttrsToList export vars
);
envVars = cfg.sessionVariables // (
if config.home.sessionVariableSetter == "zsh" then config.home.sessionVariables else {}
);
envVarsStr = toEnvVarsStr envVars;
envVarsStr = config.lib.shell.exportAll envVars;
aliasesStr = concatStringsSep "\n" (
mapAttrsToList (k: v: "alias ${k}='${v}'") cfg.shellAliases