niksos/modules/cli/nh.nix

35 lines
740 B
Nix
Raw Normal View History

2024-05-08 20:49:06 +02:00
{
config,
inputs,
lib,
pkgs,
...
}: let
2024-07-15 23:18:25 +02:00
cfg = config.poz.programs.nh;
2024-05-08 20:49:06 +02:00
2024-07-25 11:45:44 +02:00
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption mkOption;
2024-05-08 20:49:06 +02:00
inherit (lib.types) str;
in {
2024-07-15 23:18:25 +02:00
options.poz.programs.nh = {
2024-05-08 20:49:06 +02:00
enable = mkEnableOption "nh";
flake = mkOption {
type = str;
description = "flake directory";
};
};
config = mkIf cfg.enable {
programs.nh = {
enable = true;
package = inputs.nh.packages.${pkgs.system}.default;
inherit (cfg) flake;
clean = {
enable = true;
dates = "weekly";
extraArgs = "--keep 10";
};
};
};
}