From c5cad190ba252eb94540ee06955a53c7807963f8 Mon Sep 17 00:00:00 2001 From: milanglacier Date: Fri, 2 May 2025 09:18:11 -0400 Subject: [PATCH] zsh: update doc to show how to add `initContent` at multiple location. (#6945) --- modules/programs/zsh.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 4b060a2f9..268288890 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -515,6 +515,16 @@ in - 550: Before completion initialization (replaces initExtraBeforeCompInit) - 1000 (default): General configuration (replaces initExtra) - 1500 (mkAfter): Last to run configuration + + To specify both content in Early initialization and General configuration, use `lib.mkMerge`. + + e.g. + + initContent = let + zshConfigEarlyInit = lib.mkOrder 500 "do something"; + zshConfig = lib.mkOrder 1000 "do something"; + in + lib.mkMerge [ zshConfigEarlyInit zshConfig ]; ''; };