aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-17 13:43:39 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-08-17 13:43:39 +0200
commit7cdc739ece681128dd4153e53acb85867accdd1b (patch)
treec6c202a7f596f1077a3b6295344367b937963a5d /doc/manual/src
parentbf290c2306d8554b82a9f1d30279b90bf8606fa6 (diff)
parente849b198720c60c186c8f9486c43c495ad436e1b (diff)
Merge remote-tracking branch 'origin/master' into markdown
Diffstat (limited to 'doc/manual/src')
-rw-r--r--doc/manual/src/command-ref/conf-file.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/manual/src/command-ref/conf-file.md b/doc/manual/src/command-ref/conf-file.md
index ee8803e19..fdc8f5265 100644
--- a/doc/manual/src/command-ref/conf-file.md
+++ b/doc/manual/src/command-ref/conf-file.md
@@ -206,6 +206,26 @@ The following settings are currently available:
robustness in case of system crashes, but reduces performance. The
default is `true`.
+ - `hashed-mirrors`
+ A list of web servers used by `builtins.fetchurl` to obtain files by
+ hash. The default is `http://tarballs.nixos.org/`. Given a hash type
+ *ht* and a base-16 hash *h*, Nix will try to download the file from
+ *hashed-mirror*/*ht*/*h*. This allows files to be downloaded even if
+ they have disappeared from their original URI. For example, given
+ the default mirror `http://tarballs.nixos.org/`, when building the
+ derivation
+
+ ```nix
+ builtins.fetchurl {
+ url = "https://example.org/foo-1.2.3.tar.xz";
+ sha256 = "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae";
+ }
+ ```
+
+ Nix will attempt to download this file from
+ `http://tarballs.nixos.org/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae`
+ first. If it is not available there, if will try the original URI.
+
- `http-connections`
The maximum number of parallel TCP connections used to fetch files
from binary caches and by other downloads. It defaults to 25. 0