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

20 lines
414 B
Nix

# Protect my system from running out of storage or memory
{
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;
};
# 16 Cores, 32 GB RAM
# split into 4 jobs with 4C/8G
nix.settings = {
cores = 2;
max-jobs = 4;
};
}