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 {
|
enableFishIntegration = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
readOnly = true;
|
||||||
description = ''
|
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 ''
|
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||||
eval "$(${pkgs.direnv}/bin/direnv hook zsh)"
|
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