zsh: add initExtraFirst option

This commit is contained in:
Tyler Benster 2020-08-16 18:50:29 -07:00 committed by Robert Helgesson
parent a3a0f1289a
commit c6263347de
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -302,6 +302,12 @@ in
description = "Extra commands that should be added to <filename>.zshrc</filename>.";
};
initExtraFirst = mkOption {
default = "";
type = types.lines;
description = "Commands that should be added to top of <filename>.zshrc</filename>.";
};
envExtra = mkOption {
default = "";
type = types.lines;
@ -417,6 +423,8 @@ in
++ optional cfg.oh-my-zsh.enable oh-my-zsh;
home.file."${relToDotDir ".zshrc"}".text = ''
${cfg.initExtraFirst}
typeset -U path cdpath fpath manpath
${optionalString (cfg.cdpath != []) ''