hetzner_benchmark/sane-nix: init

storage and memory protection
This commit is contained in:
Primrose 2026-01-05 08:44:23 +01:00
parent 46983687c0
commit 317e43e9a0
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -0,0 +1,21 @@
# Protect my system from running out of storage or memory
{
# 500GB Storage
nix.settings = {
min-free = 20 * 1024 * 1024 * 1024;
max-free = 50 * 1024 * 1024 * 1024;
};
systemd.services.nix-daemon.serviceConfig = {
MemoryAccounting = true;
MemoryMax = "90%";
OOMScoreAdjust = 500;
};
# 12 Cores, 64 GB RAM
# split into 4 jobs with 3C/16G
nix.settings = {
cores = 3;
max-jobs = 4;
};
}