Skip to content

Commit 4d7ff2c

Browse files
authored
fix(spore): stricter nix gc to prevent disk exhaustion (#433)
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.
1 parent ee3ebdf commit 4d7ff2c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

hosts/spore/default.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,16 @@
5050
}
5151
];
5252

53+
# Stricter GC due to limited disk space (30 GB)
54+
nix.gc = {
55+
dates = "daily";
56+
options = "--delete-older-than 7d";
57+
};
58+
59+
nix.settings = {
60+
min-free = 1024 * 1024 * 1024; # 1 GB — trigger GC when free space drops below this
61+
max-free = 5 * 1024 * 1024 * 1024; # 5 GB — stop GC once this much space is free
62+
};
63+
5364
system.stateVersion = "24.05";
5465
}

0 commit comments

Comments
 (0)