nix-common: Add option for gc interval
This commit is contained in:
parent
8ab3ae5a5c
commit
a771537a65
2 changed files with 8 additions and 5 deletions
|
@ -1,8 +1,5 @@
|
|||
{ self, ... }@inputs:
|
||||
{ self, ... }:
|
||||
{ modulesPath, lib, ... }:
|
||||
# let
|
||||
# pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||
# in
|
||||
{
|
||||
imports = [
|
||||
"${modulesPath}/profiles/qemu-guest.nix"
|
||||
|
@ -26,6 +23,7 @@
|
|||
keycloak.enable = true;
|
||||
nix-common = {
|
||||
enable = true;
|
||||
gc-interval = "03:15";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -17,6 +17,11 @@ in
|
|||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
};
|
||||
gc-interval = mkOption {
|
||||
description = "How often to run nix-collect-garbage";
|
||||
type = types.str;
|
||||
default = "weekly";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
@ -82,7 +87,7 @@ in
|
|||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
dates = cfg.gc-interval;
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue