diff options
| author | tv <tv@krebsco.de> | 2026-11-16 18:10:05 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 19:38:14 +0100 |
| commit | 6cb7bc22e8419a7a16b8a4485627b162c68905cd (patch) | |
| tree | 9266853190e9b6636a9f2e67ce2cd595760afec6 | |
| parent | fad26a90a21672ad5d06e69767548a31995ba9c2 (diff) | |
binary-cache: add client
Use ne's and zu's binary cache. With fallback, Nix disables a cache it
can't reach for 60 seconds and builds instead, so an offline cache
doesn't fail the build. connect-timeout lowers the wait per attempt
from the default 15 seconds to 5.
Nix retries failed downloads from every cache up to 5 times by default.
For an unreachable cache that means waiting about 30 seconds per URL in
each Nix command before Nix disables it. With one attempt, it is
connect-timeout, 5 seconds. This also applies to cache.nixos.org.
| -rw-r--r-- | configs/binary-cache/client.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configs/binary-cache/client.nix b/configs/binary-cache/client.nix new file mode 100644 index 0000000..66b17c6 --- /dev/null +++ b/configs/binary-cache/client.nix @@ -0,0 +1,15 @@ +{ config, ... }: { + nix.settings = { + fallback = true; + connect-timeout = 5; + download-attempts = 1; + substituters = [ + "http://cache.ne.r?priority=20" + "http://cache.zu.r?priority=20" + ]; + trusted-public-keys = [ + config.krebs.hosts.ne.binary-cache.pubkey + config.krebs.hosts.zu.binary-cache.pubkey + ]; + }; +} |
