summary refs log tree commit diff
path: root/doc/functions/prefer-remote-fetch.xml
blob: 94d25d3d3aeb69e138a73e2a9d791ed76d675eb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<section xmlns="http://docbook.org/ns/docbook"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:xi="http://www.w3.org/2001/xinclude"
         xml:id="sec-prefer-remote-fetch">
 <title>prefer-remote-fetch overlay</title>

 <para>
  <function>prefer-remote-fetch</function> is an overlay that download sources on remote builder. This is useful when the evaluating machine has a slow upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay:
<programlisting>
self: super:
  (super.prefer-remote-fetch self super)
</programlisting>
  A full configuration example for that sets the overlay up for your own account, could look like this
<screen>
<prompt>$ </prompt>mkdir ~/.config/nixpkgs/overlays/
<prompt>$ </prompt>cat &gt; ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix &lt;&lt;EOF
  self: super: super.prefer-remote-fetch self super
EOF
</screen>
 </para>
</section>