summaryrefslogtreecommitdiffstats
path: root/doc/functions/prefer-remote-fetch.section.md
blob: 9f5b1951da5ce41c8fbc3c55e3a1ff84ea489ea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# prefer-remote-fetch overlay {#sec-prefer-remote-fetch}

`prefer-remote-fetch` is an overlay that downloads sources on a 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:

```nix
self: super: (super.prefer-remote-fetch self super)
```

A full configuration example that sets the overlay up for your own account could look like this

```ShellSession
$ mkdir ~/.config/nixpkgs/overlays/
$ cat > ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix <<EOF
  self: super: super.prefer-remote-fetch self super
EOF
```