@cryptotaxi247 / infra / commits / a00f52f8

Revert "macs: allow gcing up to 25% of the store"

This reverts commit eefbd1a08994b7232caa44399ce40e19a3d216fe.

Martin Weinelt committed Dec 19, 2024 at 15:51 UTC a00f52f8cf0561ba3b0c5826e8cb5760781052f0
1 file changed +2 -3
macs/nix-darwin.nix
+2 -3
@@ -63,14 +63,13 @@ in
63 automatic = true;
64 user = "root";
65 interval = {
66 - # hourly at the 15th minute
66 Minute = 15;
67 };
68 options =
69 let
71 - freePercentage = 0.25; # 25% free
70 + gbFree = 100;
71 in
73 - "--max-freed $(df -k /nix/store | awk 'NR==2 {printf \"%.0f\n\", $2 * 1024 * ${toString freePercentage}}')";
72 + "--max-freed $((${toString gbFree} * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | awk '{ print $4 }')))";
73 };
74 };
75