From fd9d64a96d693a04f282d8cff91a03fcd49ba425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=BF=20corey?= Date: Fri, 10 Apr 2026 11:31:41 -0700 Subject: [PATCH] fix(spore): stricter nix gc to prevent disk exhaustion Run GC daily with 7-day retention (vs weekly/30d globally). Add min-free/max-free to trigger proactive GC during builds when free space drops below 1 GB. --- hosts/spore/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hosts/spore/default.nix b/hosts/spore/default.nix index e18f6537..38366096 100644 --- a/hosts/spore/default.nix +++ b/hosts/spore/default.nix @@ -50,5 +50,16 @@ } ]; + # Stricter GC due to limited disk space (30 GB) + nix.gc = { + dates = "daily"; + options = "--delete-older-than 7d"; + }; + + nix.settings = { + min-free = 1024 * 1024 * 1024; # 1 GB — trigger GC when free space drops below this + max-free = 5 * 1024 * 1024 * 1024; # 5 GB — stop GC once this much space is free + }; + system.stateVersion = "24.05"; }