at 16.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 7<title>Network Problems</title> 8 9<para>Nix uses a so-called <emphasis>binary cache</emphasis> to 10optimise building a package from source into downloading it as a 11pre-built binary. That is, whenever a command like 12<command>nixos-rebuild</command> needs a path in the Nix store, Nix 13will try to download that path from the Internet rather than build it 14from source. The default binary cache is 15<uri>https://cache.nixos.org/</uri>. If this cache is unreachable, 16Nix operations may take a long time due to HTTP connection timeouts. 17You can disable the use of the binary cache by adding <option>--option 18use-binary-caches false</option>, e.g. 19 20<screen> 21# nixos-rebuild switch --option use-binary-caches false 22</screen> 23 24If you have an alternative binary cache at your disposal, you can use 25it instead: 26 27<screen> 28# nixos-rebuild switch --option binary-caches http://my-cache.example.org/ 29</screen> 30 31</para> 32 33</section>