diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 24c00f674..ffe5f4960 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -227,6 +227,12 @@ in description = "Extra commands that should be added to .zshrc."; }; + envExtra = mkOption { + default = ""; + type = types.lines; + description = "Extra commands that should be added to .zshenv."; + }; + 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; })