From 036728f3f4e068be6c4103d8d9efccd3f846f08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 26 Jun 2019 14:30:56 +0200 Subject: [PATCH] nix.binaryCaches: always set https://cache.nixos.org 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; --- nixos/modules/services/misc/nix-daemon.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 8db3c44246f..d8f90f1539c 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 lib.mkForce []. ''; }; @@ -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;