* Use nix.gc.
svn path=/configurations/trunk/tud/; revision=32356
Eelco Dolstra committed
Feb 17, 2012 at 16:50 UTC
70ed45c6a3acf4ced4db810a2e31bfc7455868ab
1 file changed
+3
-4
build-machines-common.nix
+3
-4
@@ -22,10 +22,9 @@ with pkgs.lib;
22
build-max-silent-time = 3600
23
'';
24
25
- services.cron.systemCronJobs =
26
- [ # Make sure that at least 100 GiB of disk space is available.
27
- "15 03,09,15,21 * * * root nix-store --gc --max-freed \"$((100 * 1024**3 - 1024 * $(df /nix/store | tail -n 1 | awk '{ print $4 }')))\" > /var/log/gc.log 2>&1"
28
- ];
25
+ nix.gc.automatic = true;
26
+ nix.gc.dates = "15 03,09,15,21 * * *";
27
+ nix.gc.options = ''--max-freed "$((100 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | awk '{ print $4 }')))"'';
28
29
networking.hostName = ""; # obtain from DHCP server
30