28 lines
490 B
Nix
Raw Normal View History

2025-01-20 22:35:40 -05:00
{
config,
lib,
...
}:
let
cfg = config.nmasur.presets.programs.direnv;
in
{
options.nmasur.presets.programs.direnv.enable = lib.mkEnableOption "Direnv project-level shells";
config = lib.mkIf cfg.enable {
# Enables quickly entering Nix shells when changing directories
programs.direnv = {
enable = true;
nix-direnv.enable = true;
config = {
whitelist = {
prefix = [ config.nmasur.dotfilesPath ];
};
};
};
};
}