diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-08-19 18:28:04 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-08-19 18:28:04 +0200 |
commit | c8fa39324ad7a56a78f8c6f55c42f8f49dbbbf9a (patch) | |
tree | 9b87d0ac99db4e321a7aaf233d0a43c8fc0318ea /src/libstore/filetransfer.hh | |
parent | 34b22e012350186925e513f34b1292858a81c932 (diff) |
Generate the nix.conf docs from the source code
This means we don't have two (divergent) sets of option descriptions
anymore.
Diffstat (limited to 'src/libstore/filetransfer.hh')
-rw-r--r-- | src/libstore/filetransfer.hh | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/libstore/filetransfer.hh b/src/libstore/filetransfer.hh index 25ade0add..0d608c8d8 100644 --- a/src/libstore/filetransfer.hh +++ b/src/libstore/filetransfer.hh @@ -17,15 +17,30 @@ struct FileTransferSettings : Config Setting<std::string> userAgentSuffix{this, "", "user-agent-suffix", "String appended to the user agent in HTTP requests."}; - Setting<size_t> httpConnections{this, 25, "http-connections", - "Number of parallel HTTP connections.", + Setting<size_t> httpConnections{ + this, 25, "http-connections", + R"( + The maximum number of parallel TCP connections used to fetch + files from binary caches and by other downloads. It defaults + to 25. 0 means no limit. + )", {"binary-caches-parallel-connections"}}; - Setting<unsigned long> connectTimeout{this, 0, "connect-timeout", - "Timeout for connecting to servers during downloads. 0 means use curl's builtin default."}; - - Setting<unsigned long> stalledDownloadTimeout{this, 300, "stalled-download-timeout", - "Timeout (in seconds) for receiving data from servers during download. Nix cancels idle downloads after this timeout's duration."}; + Setting<unsigned long> connectTimeout{ + this, 0, "connect-timeout", + R"( + The timeout (in seconds) for establishing connections in the + binary cache substituter. It corresponds to `curl`’s + `--connect-timeout` option. + )"}; + + Setting<unsigned long> stalledDownloadTimeout{ + this, 300, "stalled-download-timeout", + R"( + The timeout (in seconds) for receiving data from servers + during download. Nix cancels idle downloads after this + timeout's duration. + )"}; Setting<unsigned int> tries{this, 5, "download-attempts", "How often Nix will attempt to download a file before giving up."}; |