.files/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix
Léana 江 317e43e9a0
hetzner_benchmark/sane-nix: init
storage and memory protection
2026-01-05 08:46:33 +01:00

21 lines
432 B
Nix

# 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;
};
}