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 {
|
2024-09-03 01:36:22 +02:00
|
|
|
nix.settings = {
|
|
|
|
substituters = [
|
|
|
|
"https://viperml.cachix.org"
|
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8="
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-05-08 20:49:06 +02:00
|
|
|
programs.nh = {
|
|
|
|
enable = true;
|
|
|
|
package = inputs.nh.packages.${pkgs.system}.default;
|
|
|
|
inherit (cfg) flake;
|
|
|
|
clean = {
|
|
|
|
enable = true;
|
|
|
|
dates = "weekly";
|
|
|
|
extraArgs = "--keep 10";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|