base: split maintenance config into own module

This commit is contained in:
2025-09-01 14:34:15 -07:00
parent f029309e01
commit 25b420e82e
2 changed files with 21 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ in
imports = [
./borg-config.nix
./grafana-alloy.nix
./maintenance.nix
./network.nix
./qemu.nix
./secrets.nix
@@ -55,13 +56,6 @@ in
PAGER = "nvimpager";
};
# Maintenance
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
nix.settings = {
auto-optimise-store = true;
cores = 2;

20
base/maintenance.nix Normal file
View File

@@ -0,0 +1,20 @@
# Module: base/maintenance
# Configure nix-store optimization, log rotations, etc
{
config,
lib,
pkgs,
pkgsUnstable,
inputs,
...
}:
with lib;
{
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
}