2024-01-11 11:26:46 +01:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
2024-03-20 08:58:05 +01:00
|
|
|
with lib.metacfg;
|
|
|
|
let cfg = config.metacfg.tools.direnv;
|
2024-01-11 11:26:46 +01:00
|
|
|
in
|
|
|
|
{
|
2024-03-20 08:58:05 +01:00
|
|
|
options.metacfg.tools.direnv = with types; {
|
2024-01-11 11:26:46 +01:00
|
|
|
enable = mkBoolOpt false "Whether or not to enable direnv.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-03-20 08:58:05 +01:00
|
|
|
metacfg.home.extraOptions = {
|
2024-01-11 11:26:46 +01:00
|
|
|
programs.direnv = {
|
|
|
|
enable = true;
|
|
|
|
nix-direnv = enabled;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|