From 79337719ed080f9ce1212a6e1fcfb11f544b5d3e Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Mon, 28 Oct 2024 11:55:15 +0700 Subject: [PATCH] oh-my-zsh: add 'preLoaded' option --- nixos/modules/programs/zsh/oh-my-zsh.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/modules/programs/zsh/oh-my-zsh.nix b/nixos/modules/programs/zsh/oh-my-zsh.nix index 2120cf1af07e..85dae5ba664b 100644 --- a/nixos/modules/programs/zsh/oh-my-zsh.nix +++ b/nixos/modules/programs/zsh/oh-my-zsh.nix @@ -87,6 +87,15 @@ in Without this option it would default to the read-only nix store. ''; }; + + preLoaded = lib.mkOption { + type = lib.types.lines; + default = ""; + description = '' + Shell commands executed before the `oh-my-zsh` is loaded. + For example, to disable async git prompt write `zstyle ':omz:alpha:lib:git' async-prompt force` (more information https://github.com/ohmyzsh/ohmyzsh?tab=readme-ov-file#async-git-prompt) + ''; + }; }; }; @@ -120,6 +129,7 @@ in ZSH_CACHE_DIR=${cfg.cacheDir} ''} + ${cfg.preLoaded} source $ZSH/oh-my-zsh.sh '';