forked from LnL7/nix
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'new-store-settings' into settings-split
- Loading branch information
Showing
36 changed files
with
721 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
/** | ||
* Look up the setting's name in a map, falling back on the default if | ||
* it does not exist. | ||
*/ | ||
#define CONFIG_ROW(FIELD) \ | ||
.FIELD = { \ | ||
.value = ({ \ | ||
auto p = get(params, descriptions.FIELD.name); \ | ||
p ? *p : defaults.FIELD.value; \ | ||
}), \ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "binary-cache-store.hh" | ||
|
||
namespace nix { | ||
|
||
struct HttpBinaryCacheStoreConfig : virtual BinaryCacheStoreConfig | ||
{ | ||
using BinaryCacheStoreConfig::BinaryCacheStoreConfig; | ||
|
||
HttpBinaryCacheStoreConfig(std::string_view scheme, std::string_view _cacheUri, const Params & params); | ||
|
||
Path cacheUri; | ||
|
||
const std::string name() override | ||
{ | ||
return "HTTP Binary Cache Store"; | ||
} | ||
|
||
static std::set<std::string> uriSchemes() | ||
{ | ||
static bool forceHttp = getEnv("_NIX_FORCE_HTTP") == "1"; | ||
auto ret = std::set<std::string>({"http", "https"}); | ||
if (forceHttp) | ||
ret.insert("file"); | ||
return ret; | ||
} | ||
|
||
std::string doc() override; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.