zsh: Add options for remaining config files
`profileExtra`, `loginExtra` and `logoutExtra` for `zprofile`, `zlogin`, and `zlogout` respectively
This commit is contained in:
parent
fa4f9197ee
commit
b4f5b5556f
|
@ -186,6 +186,24 @@ in
|
|||
description = "Extra commands that should be added to <filename>.zshrc</filename>.";
|
||||
};
|
||||
|
||||
profileExtra = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = "Extra commands that should be added to <filename>.zprofile</filename>.";
|
||||
};
|
||||
|
||||
loginExtra = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = "Extra commands that should be added to <filename>.zlogin</filename>.";
|
||||
};
|
||||
|
||||
logoutExtra = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = "Extra commands that should be added to <filename>.zlogout</filename>.";
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
type = types.listOf pluginModule;
|
||||
default = [];
|
||||
|
@ -291,6 +309,18 @@ in
|
|||
};
|
||||
})
|
||||
|
||||
(mkIf (cfg.profileExtra != "") {
|
||||
home.file."${relToDotDir ".zprofile"}".text = cfg.profileExtra;
|
||||
})
|
||||
|
||||
(mkIf (cfg.loginExtra != "") {
|
||||
home.file."${relToDotDir ".zlogin"}".text = cfg.loginExtra;
|
||||
})
|
||||
|
||||
(mkIf (cfg.logoutExtra != "") {
|
||||
home.file."${relToDotDir ".zlogout"}".text = cfg.logoutExtra;
|
||||
})
|
||||
|
||||
(mkIf (cfg.dotDir != null) {
|
||||
programs.zsh.sessionVariables.ZDOTDIR = zdotdir;
|
||||
|
||||
|
|
Loading…
Reference in a new issue