@cryptotaxi247 / infra-1 / commits / f0b91317

hydra: increase upload attempts

Workaround missing outputs causing an incompatible rebuild that leads to SIGKILL on darwin. Ref: https://github.com/NixOS/nix/pull/15638#issuecomment-4413076030

Martin Weinelt committed May 9, 2026 at 22:27 UTC f0b91317ff4ba4edf5d5701f12a2c0ca6df16a7f
1 file changed +15 -9
build/hydra.nix
+15 -9
@@ -21,17 +21,23 @@ in
21 ip saddr $prometheus_inet4 tcp dport { 9198, 9199 } accept
22 '';
23
24 - nix.package = config.services.hydra-dev.package.nix;
24 + nix = {
25 + package = config.services.hydra-dev.package.nix;
26
26 - # garbage collection
27 - nix.gc = {
28 - automatic = true;
29 - options = ''--max-freed "$((400 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
30 - dates = "03,09,15,21:15";
31 - };
27 + settings = {
28 + # gc outputs as well, since they are served from the cache
29 + keep-outputs = lib.mkForce false;
30 +
31 + # retry uploads (yes, uploads) harder; defaults to 5 otherwise
32 + download-attempts = 32;
33 + };
34
33 - # gc outputs as well, since they are served from the cache
34 - nix.settings.keep-outputs = lib.mkForce false;
35 + gc = {
36 + automatic = true;
37 + options = ''--max-freed "$((400 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
38 + dates = "03,09,15,21:15";
39 + };
40 + };
41
42 systemd.services.hydra-prune-build-logs = {
43 description = "Clean up old build logs";