spread nix store optimiser over time

This commit is contained in:
XenGi 2026-02-22 15:41:37 +01:00
parent 6625e9c1f3
commit 568c968ca8
Signed by: xengi
SSH key fingerprint: SHA256:jxWM2RTHvxxcncXycwwWkP7HCWb4VREN05UGJTbIPZg
11 changed files with 18 additions and 13 deletions

View file

@ -1,13 +1,9 @@
{ config, lib, pkgs, ... }:
let
randomHour = import ../lib/randomHour.nix { inherit lib; };
in
{
nix = {
optimise = {
automatic = true;
dates = [ "${toString randomHour config.networking.hostName}:00" ];
};
settings = {
auto-optimise-store = true;

View file

@ -7,5 +7,7 @@
../../services/openssh.nix
../../services/etcd.nix
];
nix.optimise.dates = [ "01:00" ];
}

View file

@ -7,5 +7,7 @@
../../services/openssh.nix
../../services/etcd.nix
];
nix.optimise.dates = [ "02:00" ];
}

View file

@ -7,5 +7,7 @@
../../services/openssh.nix
../../services/etcd.nix
];
nix.optimise.dates = [ "03:00" ];
}

View file

@ -6,6 +6,8 @@
../../services/openssh.nix
];
nix.optimise.dates = [ "00:00" ];
boot = {
initrd.availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "megaraid_sas" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
kernelModules = [ "kvm-intel" ];

View file

@ -7,5 +7,7 @@
../../services/openssh.nix
../../services/etcd.nix
];
nix.optimise.dates = [ "04:00" ];
}

View file

@ -7,5 +7,7 @@
../../services/openssh.nix
../../services/etcd.nix
];
nix.optimise.dates = [ "05:00" ];
}

View file

@ -7,5 +7,7 @@
../../services/openssh.nix
../../services/etcd.nix
];
nix.optimise.dates = [ "06:00" ];
}

View file

@ -7,5 +7,7 @@
../../services/openssh.nix
../../services/etcd.nix
];
nix.optimise.dates = [ "07:00" ];
}

View file

@ -7,5 +7,7 @@
../../services/openssh.nix
../../services/etcd.nix
];
nix.optimise.dates = [ "08:00" ];
}