21 lines
409 B
Nix
21 lines
409 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
cfg = config.myConfig.shell.direnv;
|
|
in {
|
|
options.myConfig.shell.direnv = {
|
|
enable = lib.mkEnableOption "direnv for changing the environment when entering a directory";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs.direnv = {
|
|
enable = true;
|
|
enableBashIntegration = true;
|
|
enableZshIntegration = true;
|
|
nix-direnv.enable = true;
|
|
};
|
|
};
|
|
}
|