mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
zsh: Add options for remaining config files
`profileExtra`, `loginExtra` and `logoutExtra` for `zprofile`, `zlogin`, and `zlogout` respectively
This commit is contained in:
committed by
Nikita Uvarov
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user