From 7fa890462d2105566cc36599833cb3cb153df0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Tom=C3=A9?= Date: Wed, 25 Mar 2020 15:40:42 +0100 Subject: [PATCH] zsh: support extra settings in oh-my-zsh plugins (#1106) Co-Authored-By: Robert Helgesson --- modules/programs/zsh.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index b6e03a088..0e830215b 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -152,6 +152,17 @@ let Name of the theme to be used by oh-my-zsh. ''; }; + + extraConfig = mkOption { + default = ""; + example = '' + zstyle :omz:plugins:ssh-agent identities id_rsa id_rsa2 id_github + ''; + type = types.lines; + description = '' + Extra settings for plugins. + ''; + }; }; }; @@ -398,6 +409,8 @@ in ${envVarsStr} ${optionalString cfg.oh-my-zsh.enable '' + # oh-my-zsh extra settings for plugins + ${cfg.oh-my-zsh.extraConfig} # oh-my-zsh configuration generated by NixOS ${optionalString (cfg.oh-my-zsh.plugins != []) "plugins=(${concatStringsSep " " cfg.oh-my-zsh.plugins})"