Hacker News new | ask | show | jobs
by ruffsl 95 days ago
In using your server as a proxy cache, do you just include the server as a nix cache substitutor, or simply use a MITM approach using something like squid proxy?

If the former, via substitutor (or if also using a remote builder), how do you manage when moving portable clients outside your LAN? E.g. traveling with your laptop? Do you tunnel back home, have a toggle to change substitutor priorities?

I find it the default timeout for unresponsive substituters excessively long, as well as the repeated retries for each requested derivation annoying, rather than it recalling and skipping unresponsive substituters for subsequent derivations in the same nix switch/build invocation.

1 comments

The server is configured as a caching reverse proxy (just nginx with cache.nixos.org as upstream) which I think is similar to squid proxy.

Outside my LAN I do have the ability to tunnel home, but depending on the connection and the updates I just deal with the timeouts, or just wait until I get home.

I think technically you can override substituters using cli options but its not ideal. There are several proposals for configuring timeouts per substituter but none of them are merged yet.