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 = {