From fb95302250b489590d31e7d2cb0acbdca32896a0 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 10 Feb 2018 18:18:57 +0000 Subject: [PATCH] zsh: add oh-my-zsh.extraConfig option --- modules/programs/zsh.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 8005d69f..6f15f002 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -120,6 +120,18 @@ let Name of the theme to be used by oh-my-zsh. ''; }; + + extraConfig = mkOption { + default = ""; + example = '' + # Configuration of the per-directory-history plugin + HISTORY_BASE="$HOME/.zsh/per-directory-history" + ''; + type = types.lines; + description = '' + Commands to be run before loading oh-my-zsh, such as plugin configuration. + ''; + }; }; }; @@ -312,6 +324,7 @@ in ${optionalString (cfg.oh-my-zsh.theme != "") "ZSH_THEME=\"${cfg.oh-my-zsh.theme}\"" } + ${cfg.oh-my-zsh.extraConfig} source $ZSH/oh-my-zsh.sh ''}