From 3acb95f7455f8ccdd21021242559b6bd7a2fa468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 18 Jan 2026 00:10:07 +0100 Subject: [PATCH] hetzner_benchmark: update {min,max}-free with a formula --- nix/configurations/hetzner_benchmark/nixos/sane-nix.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix b/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix index 3419eae6..54f76994 100644 --- a/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix +++ b/nix/configurations/hetzner_benchmark/nixos/sane-nix.nix @@ -1,9 +1,11 @@ # Protect my system from running out of storage or memory +let + totalStorage = 500; +in { - # 500GB Storage nix.settings = { - min-free = 50 * 1024 * 1024 * 1024; - max-free = 100 * 1024 * 1024 * 1024; + min-free = builtins.ceil (totalStorage * 0.2) * 1024 * 1024 * 1024; + max-free = builtins.ceil (totalStorage * 0.3) * 1024 * 1024 * 1024; }; systemd.services.nix-daemon.serviceConfig = {