.files/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix

14 lines
317 B
Nix

# Protect my system from running out of storage or memory
{
# 500GB Storage
nix.settings = {
min-free = 50 * 1024 * 1024 * 1024;
max-free = 100 * 1024 * 1024 * 1024;
};
systemd.services.nix-daemon.serviceConfig = {
MemoryAccounting = true;
MemoryMax = "90%";
OOMScoreAdjust = 500;
};
}