at 18.09-beta 1.1 kB view raw
1<section xmlns="http://docbook.org/ns/docbook" 2 xmlns:xlink="http://www.w3.org/1999/xlink" 3 xmlns:xi="http://www.w3.org/2001/XInclude" 4 version="5.0" 5 xml:id="sec-nix-network-issues"> 6 <title>Network Problems</title> 7 8 <para> 9 Nix uses a so-called <emphasis>binary cache</emphasis> to optimise building a 10 package from source into downloading it as a pre-built binary. That is, 11 whenever a command like <command>nixos-rebuild</command> needs a path in the 12 Nix store, Nix will try to download that path from the Internet rather than 13 build it from source. The default binary cache is 14 <uri>https://cache.nixos.org/</uri>. If this cache is unreachable, Nix 15 operations may take a long time due to HTTP connection timeouts. You can 16 disable the use of the binary cache by adding <option>--option 17 use-binary-caches false</option>, e.g. 18<screen> 19# nixos-rebuild switch --option use-binary-caches false 20</screen> 21 If you have an alternative binary cache at your disposal, you can use it 22 instead: 23<screen> 24# nixos-rebuild switch --option binary-caches http://my-cache.example.org/ 25</screen> 26 </para> 27</section>