summary refs log tree commit diff
path: root/nixos/modules/services/misc/nix-daemon.nix
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2019-06-26 14:30:56 +0200
committerDomen Kožar <domen@dev.si>2019-06-26 14:30:56 +0200
commit036728f3f4e068be6c4103d8d9efccd3f846f08b (patch)
tree665f159cbcbebe94e96be8a63f1a57fb5f2a3941 /nixos/modules/services/misc/nix-daemon.nix
parente8916cc6af7daf2de5008f3063441c8b3f00e9ac (diff)
downloadnixpkgs-036728f3f4e068be6c4103d8d9efccd3f846f08b.tar
nixpkgs-036728f3f4e068be6c4103d8d9efccd3f846f08b.tar.gz
nixpkgs-036728f3f4e068be6c4103d8d9efccd3f846f08b.tar.bz2
nixpkgs-036728f3f4e068be6c4103d8d9efccd3f846f08b.tar.lz
nixpkgs-036728f3f4e068be6c4103d8d9efccd3f846f08b.tar.xz
nixpkgs-036728f3f4e068be6c4103d8d9efccd3f846f08b.tar.zst
nixpkgs-036728f3f4e068be6c4103d8d9efccd3f846f08b.zip
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;
Diffstat (limited to 'nixos/modules/services/misc/nix-daemon.nix')
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix5
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 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 <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;