2022-04-10 11:54:58 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit
|
|
|
|
(lib)
|
2022-01-11 16:08:21 +01:00
|
|
|
mkEnableOption
|
|
|
|
mkIf
|
2022-04-10 11:54:58 +02:00
|
|
|
;
|
2022-01-11 16:08:21 +01:00
|
|
|
|
2024-03-04 19:21:23 +01:00
|
|
|
cfg = config.my.home.direnv;
|
2022-04-10 11:54:58 +02:00
|
|
|
in {
|
2024-03-04 19:21:23 +01:00
|
|
|
options.my.home.direnv = {
|
|
|
|
enable = (mkEnableOption "setup direnv usage") // {default = true;};
|
2021-09-10 23:49:21 +02:00
|
|
|
};
|
|
|
|
|
2022-01-11 16:08:21 +01:00
|
|
|
config = mkIf cfg.enable {
|
2021-09-10 23:49:21 +02:00
|
|
|
programs.direnv = {
|
2022-04-10 11:54:58 +02:00
|
|
|
enable = true;
|
|
|
|
nix-direnv = {
|
2021-09-10 23:49:21 +02:00
|
|
|
enable = true;
|
2022-04-10 11:54:58 +02:00
|
|
|
};
|
2021-09-10 23:49:21 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|