mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 13:39:46 +01:00
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
1 changed files with 30 additions and 0 deletions
|
@ -186,6 +186,24 @@ in
|
||||||
description = "Extra commands that should be added to <filename>.zshrc</filename>.";
|
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 {
|
plugins = mkOption {
|
||||||
type = types.listOf pluginModule;
|
type = types.listOf pluginModule;
|
||||||
default = [];
|
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) {
|
(mkIf (cfg.dotDir != null) {
|
||||||
programs.zsh.sessionVariables.ZDOTDIR = zdotdir;
|
programs.zsh.sessionVariables.ZDOTDIR = zdotdir;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue