diff options
| author | Domen Kožar <domen@dev.si> | 2019-06-26 14:30:56 +0200 |
|---|---|---|
| committer | Domen Kožar <domen@dev.si> | 2019-06-26 14:30:56 +0200 |
| commit | 036728f3f4e068be6c4103d8d9efccd3f846f08b (patch) | |
| tree | 665f159cbcbebe94e96be8a63f1a57fb5f2a3941 | |
| parent | duplicati: allow changing the user (diff) | |
| download | nixpkgs-origin/binaryCaches-default.tar.gz | |
nix.binaryCaches: always set https://cache.nixos.orgorigin/binaryCaches-default
There are many support questions when people add a new binary cache
and they suddenly lose nixos substitutions.
Most of the users want to keep that, so we're doing a breaking change.
Previously to disable all binary caches one had to do:
nix.binaryCache = [];
Now the same is possible via:
nix.binaryCache = lib.mkForce;
| -rw-r--r-- | nixos/modules/services/misc/nix-daemon.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 8db3c44246f3..d8f90f1539c1 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -272,10 +272,12 @@ in binaryCaches = mkOption { type = types.listOf types.str; - default = [ https://cache.nixos.org/ ]; description = '' List of binary cache URLs used to obtain pre-built binaries of Nix packages. + + By default https://cache.nixos.org/ is added, + to override it use <literal>lib.mkForce []</literal>. ''; }; @@ -386,6 +388,7 @@ in config = { nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + nix.binaryCaches = [ "https://cache.nixos.org/" ]; environment.etc."nix/nix.conf".source = nixConf; |
