hetzner_benchmark: update {min,max}-free with a formula

This commit is contained in:
Primrose 2026-01-18 00:10:07 +01:00
parent c43cd8b595
commit 3acb95f745
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -1,9 +1,11 @@
# Protect my system from running out of storage or memory # Protect my system from running out of storage or memory
let
totalStorage = 500;
in
{ {
# 500GB Storage
nix.settings = { nix.settings = {
min-free = 50 * 1024 * 1024 * 1024; min-free = builtins.ceil (totalStorage * 0.2) * 1024 * 1024 * 1024;
max-free = 100 * 1024 * 1024 * 1024; max-free = builtins.ceil (totalStorage * 0.3) * 1024 * 1024 * 1024;
}; };
systemd.services.nix-daemon.serviceConfig = { systemd.services.nix-daemon.serviceConfig = {