From 5589b28e66ccaa13852c8aa58ecb45025e88e67e Mon Sep 17 00:00:00 2001 From: alois31 <36605164+alois31@users.noreply.github.com> Date: Fri, 18 Nov 2022 17:00:57 +0100 Subject: [PATCH] opam: add fish integration (#3422) --- modules/programs/opam.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/programs/opam.nix b/modules/programs/opam.nix index 9cd76d956..2916fb197 100644 --- a/modules/programs/opam.nix +++ b/modules/programs/opam.nix @@ -34,6 +34,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 "$(${cfg.package}/bin/opam env --shell=zsh)" ''; + + programs.fish.shellInit = mkIf cfg.enableFishIntegration '' + eval "$(${cfg.package}/bin/opam env --shell=fish)" + ''; }; }