2024-05-22 14:29:45 +02:00
|
|
|
{
|
|
|
|
config,
|
2024-09-20 23:06:21 +02:00
|
|
|
lib,
|
2024-05-22 14:29:45 +02:00
|
|
|
...
|
2024-11-04 01:20:09 +01:00
|
|
|
}: let
|
2024-05-22 14:29:45 +02:00
|
|
|
cfg = config.modules.programs.nh;
|
2024-08-16 13:44:44 +02:00
|
|
|
inherit (config.modules.other.system) username;
|
2024-11-04 01:20:09 +01:00
|
|
|
inherit (lib) mkEnableOption mkIf;
|
2024-05-14 20:33:43 +02:00
|
|
|
in {
|
|
|
|
options.modules.programs.nh.enable = mkEnableOption "nh";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-05-15 00:14:59 +02:00
|
|
|
programs.nh = {
|
|
|
|
enable = true;
|
2024-08-13 11:48:37 +02:00
|
|
|
clean.enable = true;
|
2024-05-15 00:14:59 +02:00
|
|
|
clean.extraArgs = "--keep-since 4d --keep 3";
|
2024-09-20 23:06:21 +02:00
|
|
|
flake = "/home/${username}/repos/projects/nichts";
|
2024-05-15 00:14:59 +02:00
|
|
|
};
|
2024-05-14 20:33:43 +02:00
|
|
|
};
|
|
|
|
}
|