mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 04:02:10 +00:00
This commit is contained in:
parent
fe28966179
commit
faf0797c0c
|
@ -12,9 +12,9 @@ pre-built binary. That is, whenever a command like
|
|||
<command>nixos-rebuild</command> needs a path in the Nix store, Nix
|
||||
will try to download that path from the Internet rather than build it
|
||||
from source. The default binary cache is
|
||||
<uri>http://cache.nixos.org/</uri>. If this cache is unreachable, Nix
|
||||
operations may take a long time due to HTTP connection timeouts. You
|
||||
can disable the use of the binary cache by adding <option>--option
|
||||
<uri>https://cache.nixos.org/</uri>. If this cache is unreachable,
|
||||
Nix operations may take a long time due to HTTP connection timeouts.
|
||||
You can disable the use of the binary cache by adding <option>--option
|
||||
use-binary-caches false</option>, e.g.
|
||||
|
||||
<screen>
|
||||
|
@ -30,4 +30,4 @@ $ nixos-rebuild switch --option binary-caches http://my-cache.example.org/
|
|||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -156,7 +156,7 @@ if [ -n "$buildNix" ]; then
|
|||
exit 1
|
||||
fi
|
||||
if ! nix-store -r $nixStorePath --add-root $tmpDir/nix --indirect \
|
||||
--option extra-binary-caches http://cache.nixos.org/; then
|
||||
--option extra-binary-caches https://cache.nixos.org/; then
|
||||
echo "warning: don't know how to get latest Nix" >&2
|
||||
fi
|
||||
# Older version of nix-store -r don't support --add-root.
|
||||
|
|
|
@ -225,7 +225,7 @@ in
|
|||
|
||||
binaryCaches = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ http://cache.nixos.org/ ];
|
||||
default = [ https://cache.nixos.org/ ];
|
||||
description = ''
|
||||
List of binary cache URLs used to obtain pre-built binaries
|
||||
of Nix packages.
|
||||
|
|
|
@ -29,6 +29,10 @@ let
|
|||
pkgs.unionfs-fuse
|
||||
pkgs.gummiboot
|
||||
];
|
||||
|
||||
# Don't use https://cache.nixos.org since the fake
|
||||
# cache.nixos.org doesn't do https.
|
||||
nix.binaryCaches = [ http://cache.nixos.org/ ];
|
||||
}
|
||||
];
|
||||
}).config.system.build.isoImage;
|
||||
|
@ -59,6 +63,8 @@ let
|
|||
${optionalString (!readOnly) "nix.readOnlyStore = false;"}
|
||||
|
||||
environment.systemPackages = [ ${optionalString testChannel "pkgs.rlwrap"} ];
|
||||
|
||||
nix.binaryCaches = [ http://cache.nixos.org/ ];
|
||||
}
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue