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, ... }:
|
{ modulesPath, lib, ... }:
|
||||||
# let
|
|
||||||
# pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux;
|
|
||||||
# in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${modulesPath}/profiles/qemu-guest.nix"
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
|
@ -26,6 +23,7 @@
|
||||||
keycloak.enable = true;
|
keycloak.enable = true;
|
||||||
nix-common = {
|
nix-common = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
gc-interval = "03:15";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,11 @@ in
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
gc-interval = mkOption {
|
||||||
|
description = "How often to run nix-collect-garbage";
|
||||||
|
type = types.str;
|
||||||
|
default = "weekly";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -82,7 +87,7 @@ in
|
||||||
|
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = cfg.gc-interval;
|
||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue