From c6263347de7eabf23aa2ebc73baa1a9565b80495 Mon Sep 17 00:00:00 2001 From: Tyler Benster Date: Sun, 16 Aug 2020 18:50:29 -0700 Subject: [PATCH] zsh: add initExtraFirst option --- modules/programs/zsh.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index efe2946c..9e3c517d 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -302,6 +302,12 @@ in description = "Extra commands that should be added to .zshrc."; }; + initExtraFirst = mkOption { + default = ""; + type = types.lines; + description = "Commands that should be added to top of .zshrc."; + }; + 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 != []) ''