Skip to content

Commit 036728f

Browse files
committedJun 26, 2019
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;
1 parent e8916cc commit 036728f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎nixos/modules/services/misc/nix-daemon.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,12 @@ in
272272

273273
binaryCaches = mkOption {
274274
type = types.listOf types.str;
275-
default = [ https://cache.nixos.org/ ];
276275
description = ''
277276
List of binary cache URLs used to obtain pre-built binaries
278277
of Nix packages.
278+
279+
By default https://cache.nixos.org/ is added,
280+
to override it use <literal>lib.mkForce []</literal>.
279281
'';
280282
};
281283

@@ -386,6 +388,7 @@ in
386388
config = {
387389

388390
nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
391+
nix.binaryCaches = [ "https://cache.nixos.org/" ];
389392

390393
environment.etc."nix/nix.conf".source = nixConf;
391394

3 commit comments

Comments
 (3)

vaibhavsagar commented on Jul 15, 2019

@vaibhavsagar
Member

Is that lib.mkForce [] to override?

domenkozar commented on Jul 15, 2019

@domenkozar
MemberAuthor

Yes :)

vaibhavsagar commented on Jul 15, 2019

@vaibhavsagar
Member

Thanks, I was confused by the commit message 😄.

Please sign in to comment.