direnv: make fish enable flag read-only
We cannot disable direnv for Fish since the functionality is automatically loaded when the package is installed. Fixes #2357
This commit is contained in:
parent
91155a98ed
commit
3e4fedc1d9
|
@ -66,8 +66,11 @@ in {
|
|||
enableFishIntegration = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
readOnly = true;
|
||||
description = ''
|
||||
Whether to enable Fish integration.
|
||||
Whether to enable Fish integration. Note, enabling the direnv module
|
||||
will always active its functionality for Fish since the direnv package
|
||||
automatically gets loaded in Fish.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -106,9 +109,5 @@ in {
|
|||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
eval "$(${pkgs.direnv}/bin/direnv hook zsh)"
|
||||
'';
|
||||
|
||||
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''
|
||||
${pkgs.direnv}/bin/direnv hook fish | source
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue