1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-03 05:23:32 +02:00

opam: add fish integration (#3422)

This commit is contained in:
alois31 2022-11-18 17:00:57 +01:00 committed by GitHub
parent c94c9c342f
commit 5589b28e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,14 @@ in {
Whether to enable Zsh integration. Whether to enable Zsh integration.
''; '';
}; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -46,5 +54,9 @@ in {
programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
eval "$(${cfg.package}/bin/opam env --shell=zsh)" eval "$(${cfg.package}/bin/opam env --shell=zsh)"
''; '';
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''
eval "$(${cfg.package}/bin/opam env --shell=fish)"
'';
}; };
} }