@cryptotaxi247 / infra / commits / 1409ce67

macs: regularly prune logs

Especially the uuiidtext database gets huge over time.

Martin Weinelt committed Apr 3, 2026 at 21:05 UTC 1409ce67cf63f712a14351e9bd157bd37b8f2f77
1 file changed +12
macs/minimal.nix
+12
@@ -92,4 +92,16 @@ in
92 serviceConfig.StandardErrorPath = "/var/log/rosetta2-gc.log";
93 serviceConfig.StandardOutPath = "/var/log/rosetta2-gc.log";
94 };
95 +
96 + # MacOS stores extensive logs in /var/db/uuidtext, which cause high disk usage
97 + # Manually: find /var/db/uuidtext -type f -mtime +7 -delete
98 + launchd.daemons.log-erase = {
99 + script = ''
100 + date
101 + log erase --all
102 + '';
103 + serviceConfig.StartInterval = 3600 * 24;
104 + serviceConfig.StandardErrorPath = "/var/log/uuidtext-gc.log";
105 + serviceConfig.StandardOutPath = "/var/log/uuidtext-gc.log";
106 + };
107 }