nichts/modules/programs/cli/nh.mod.nix

31 lines
631 B
Nix
Raw Permalink Normal View History

2024-05-22 14:29:45 +02:00
{
config,
2024-09-20 23:06:21 +02:00
lib,
pkgs,
sources,
2024-05-22 14:29:45 +02:00
...
}:
let
2024-05-22 14:29:45 +02:00
cfg = config.modules.programs.nh;
inherit (config.modules.other.system) username;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
nh = (pkgs.callPackage "${sources.nh}/package.nix" { }).overrideAttrs (_: {
doInstallCheck = false;
});
in
{
2024-05-14 20:33:43 +02:00
options.modules.programs.nh.enable = mkEnableOption "nh";
config = mkIf cfg.enable {
programs.nh = {
enable = true;
package = nh;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/${username}/repos/projects/nichts/main";
};
2024-05-14 20:33:43 +02:00
};
}