Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a6964ba5b3182dd0f37ba74d4c3498305d83e
28 lines
630 B
Nix
28 lines
630 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
sources,
|
|
...
|
|
}: let
|
|
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 {
|
|
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";
|
|
};
|
|
};
|
|
}
|