Commit 945b9e9cce82

Vincent Demeester <vincent@sbr.pm>
2026-08-11 22:34:40
fix(nix): shortened substituter failure timeouts
An unreachable local cache stalled every store path for over a minute with the default five attempts and no connect timeout, which happens whenever the okinawa laptop is off.
1 parent 076028b
Changed files (3)
systems/common/fedora-work/gen-configs.nix
@@ -37,6 +37,8 @@ let
     trusted-users = root @wheel
     extra-substituters = http://okinawa.vpn:5000
     extra-trusted-public-keys = cache.okinawa.home:gp+IG0OaO4L/J0drL8OwmDtMPmdUq4kfLwg3mR8BkCs=
+    connect-timeout = 5
+    download-attempts = 2
   '';
 
   nmDispatcher = pkgs.writeScript "99-wireguard-route" ''
systems/common/fedora-work/system.nix
@@ -36,6 +36,8 @@ in
         trusted-users = root @wheel
         extra-substituters = http://okinawa.vpn:5000
         extra-trusted-public-keys = cache.okinawa.home:gp+IG0OaO4L/J0drL8OwmDtMPmdUq4kfLwg3mR8BkCs=
+        connect-timeout = 5
+        download-attempts = 2
       '';
       mode = "0644";
     };
systems/default.nix
@@ -118,7 +118,8 @@
     };
 
     extraOptions = ''
-      connect-timeout = 20
+      connect-timeout = 5
+      download-attempts = 2
       build-cores = 0
       keep-outputs = true
       keep-derivations = true