mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 13:39:46 +01:00
zsh: add envExtra option
This commit is contained in:
parent
ed0e40dee8
commit
5203340b64
1 changed files with 10 additions and 0 deletions
|
@ -227,6 +227,12 @@ in
|
||||||
description = "Extra commands that should be added to <filename>.zshrc</filename>.";
|
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 {
|
profileExtra = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
|
@ -293,6 +299,10 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
(mkIf (cfg.envExtra != "") {
|
||||||
|
home.file."${relToDotDir ".zshenv"}".text = cfg.envExtra;
|
||||||
|
})
|
||||||
|
|
||||||
(mkIf (cfg.profileExtra != "") {
|
(mkIf (cfg.profileExtra != "") {
|
||||||
home.file."${relToDotDir ".zprofile"}".text = cfg.profileExtra;
|
home.file."${relToDotDir ".zprofile"}".text = cfg.profileExtra;
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue