Watch
0
0
Fork
You've already forked hyperhive
0

ci-runner: warn when the host has no nix store gc

This commit is contained in:
atlas 2026-11-11 18:16:54 +01:00 • committed by mara
commit 493d2e6c37
2 changed files with 47 additions and 3 deletions

View file

@ -314,8 +314,10 @@ CI day can fill the disk until every job fails fast with `ENOSPC`.
Store GC is a **host-level** concern, so it belongs in the host's own NixOS
configuration, not in the hyperhive service modules — a single service should
not reach out and change the host's global nix-daemon options. Add the
following to your host config:
not reach out and change the host's global nix-daemon options. The module
only warns at `nixos-rebuild` time when the host sets neither
`nix.gc.automatic` nor `nix.settings.min-free`. Add the following to your
host config:
```nix
{

View file

@ -32,6 +32,18 @@ in
];
};
# CI builds land in this host's store; the runner module warns without a
# collector. See docs/4-implementation/scheduler/ci.md, "Host store
# maintenance", for the daily timer and the disk-pressure settings.
nix.gc = {
automatic = true;
dates = "daily";
randomizedDelaySec = "45min";
options = "--delete-older-than 1d";
};
nix.settings.min-free = 20 * 1024 * 1024 * 1024;
nix.settings.max-free = 50 * 1024 * 1024 * 1024;
# The cache is served through the gateway, over the VPN only.
networking.firewall.interfaces.wg0.allowedTCPPorts = [ hyperhive.gateway.httpsPort ];
}