Include the cache.nixos.org signing key by default

This commit is contained in:
Eelco Dolstra 2015-06-01 17:14:03 +02:00
parent bc51175dc0
commit b8b571cfc1

View file

@ -23,6 +23,8 @@ $useBindings = "@perlbindings@" eq "yes";
%binaryCachePublicKeys = (); %binaryCachePublicKeys = ();
$defaultPublicKeys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=";
sub readConfig { sub readConfig {
if (defined $ENV{'_NIX_OPTIONS'}) { if (defined $ENV{'_NIX_OPTIONS'}) {
foreach my $s (split '\n', $ENV{'_NIX_OPTIONS'}) { foreach my $s (split '\n', $ENV{'_NIX_OPTIONS'}) {
@ -41,7 +43,7 @@ sub readConfig {
close CONFIG; close CONFIG;
} }
foreach my $s (split(/ /, $config{"binary-cache-public-keys"} // "")) { foreach my $s (split(/ /, $config{"binary-cache-public-keys"} // $defaultPublicKeys)) {
my ($keyName, $publicKey) = split ":", $s; my ($keyName, $publicKey) = split ":", $s;
next unless defined $keyName && defined $publicKey; next unless defined $keyName && defined $publicKey;
$binaryCachePublicKeys{$keyName} = decode_base64($publicKey); $binaryCachePublicKeys{$keyName} = decode_base64($publicKey);