mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 08:42:02 +00:00
28 lines
490 B
Nix
28 lines
490 B
Nix
{
|
|
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 ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|