From 99a0e2469bae1711b53bdf3fd20f88aa333f6655 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 27 Aug 2018 19:21:01 +0800 Subject: [PATCH] direnv: add fish support --- modules/programs/direnv.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix index 1f0211a16..e16543093 100644 --- a/modules/programs/direnv.nix +++ b/modules/programs/direnv.nix @@ -29,6 +29,14 @@ in Whether to enable Zsh integration. ''; }; + + enableFishIntegration = mkOption { + default = true; + type = types.bool; + description = '' + Whether to enable Fish integration. + ''; + }; }; config = mkIf cfg.enable { @@ -46,5 +54,9 @@ in programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' eval "$(${pkgs.direnv}/bin/direnv hook zsh)" ''; + + programs.fish.shellInit = mkIf cfg.enableFishIntegration '' + eval (${pkgs.direnv}/bin/direnv hook fish) + ''; }; }