mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
zsh: add envExtra option
This commit is contained in:
committed by
Matthieu Coudron
parent
ed0e40dee8
commit
5203340b64
@@ -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;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user