1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Turn $NIX_REMOTE into a configuration option

This commit is contained in:
Eelco Dolstra 2017-10-23 19:34:49 +02:00
parent 38dcd0c4b8
commit f32cdc4fab
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 8 additions and 7 deletions

View file

@ -2,6 +2,7 @@
#include "types.hh"
#include "config.hh"
#include "util.hh"
#include <map>
#include <limits>
@ -84,6 +85,9 @@ public:
/* File name of the socket the daemon listens to. */
Path nixDaemonSocketFile;
Setting<std::string> storeUri{this, getEnv("NIX_REMOTE", "auto"), "store",
"The default Nix store to use."};
Setting<bool> keepFailed{this, false, "keep-failed",
"Whether to keep temporary directories of failed builds."};

View file

@ -716,7 +716,7 @@ void removeTempRoots();
You can pass parameters to the store implementation by appending
?key=value&key=value&... to the URI.
*/
ref<Store> openStore(const std::string & uri = getEnv("NIX_REMOTE"),
ref<Store> openStore(const std::string & uri = settings.storeUri.get(),
const Store::Params & extraParams = Store::Params());
@ -727,7 +727,8 @@ enum StoreType {
};
StoreType getStoreType(const std::string & uri = getEnv("NIX_REMOTE"), const std::string & stateDir = settings.nixStateDir);
StoreType getStoreType(const std::string & uri = settings.storeUri.get(),
const std::string & stateDir = settings.nixStateDir);
/* Return the default substituter stores, defined by the
substituters option and various legacy options like