1
1
Fork 0
nixos/options/custom/programs/direnv.nix
Myned 8820846d31
nix: fix stable options
Signed-off-by: Myned <dev@bjork.tech>
2024-12-14 22:26:16 -06:00

32 lines
656 B
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.custom.programs.direnv;
in {
options.custom.programs.direnv.enable = mkOption {default = false;};
config = mkIf cfg.enable {
# https://github.com/direnv/direnv
programs.direnv =
{
enable = true;
loadInNixShell = false; # nix develop
}
// optionalAttrs (versionAtLeast version "24.11") {
silent = true;
};
home-manager.users.${config.custom.username} = {
programs.direnv =
{
enable = true;
}
// optionalAttrs (versionAtLeast version "24.11") {
silent = true;
};
};
};
}