From a7102403cdb42a810b6bb63dcc80f10a49bcebd3 Mon Sep 17 00:00:00 2001 From: Leonard Sheng Sheng Lee Date: Tue, 26 Nov 2024 08:28:43 +0100 Subject: [PATCH] feat(zsh): initExtraLast option Implement initExtraLast option to place commands at the bottom of .zshrc file. Signed-off-by: Leonard Sheng Sheng Lee --- modules/programs/zsh.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index b6e46392c..2c6349fbc 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -469,6 +469,12 @@ in description = "Commands that should be added to top of {file}`.zshrc`."; }; + initExtraLast = mkOption { + default = ""; + type = types.lines; + description = "Commands that should be added to bottom of {file}`.zshrc`."; + }; + envExtra = mkOption { default = ""; type = types.lines; @@ -738,6 +744,10 @@ in } '') + cfg.initExtraLast + + # zprof must place last after everything else, since it + # benchmarks the shell initialization. (optionalString cfg.zprof.enable '' zprof