diff options
author | Tobias Happ <tobias.happ@gmx.de> | 2019-07-23 21:58:06 +0200 |
---|---|---|
committer | Matthieu Coudron <coudron@iij.ad.jp> | 2019-08-16 17:00:08 +0900 |
commit | 5203340b64328d14a7d6eee68d846d13fe97fb0d (patch) | |
tree | bafa7f7447518cb6193420490d9469553cb4f881 /modules | |
parent | ed0e40dee87a2ced45e5094a1769151292e08ee0 (diff) |
zsh: add envExtra option
Diffstat (limited to 'modules')
-rw-r--r-- | modules/programs/zsh.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 24c00f67479..ffe5f4960b6 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -227,6 +227,12 @@ in description = "Extra commands that should be added to <filename>.zshrc</filename>."; }; + envExtra = mkOption { + default = ""; + type = types.lines; + description = "Extra commands that should be added to <filename>.zshenv</filename>."; + }; + profileExtra = mkOption { default = ""; type = types.lines; @@ -293,6 +299,10 @@ in }; config = mkIf cfg.enable (mkMerge [ + (mkIf (cfg.envExtra != "") { + home.file."${relToDotDir ".zshenv"}".text = cfg.envExtra; + }) + (mkIf (cfg.profileExtra != "") { home.file."${relToDotDir ".zprofile"}".text = cfg.profileExtra; }) |