about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-01T15·14+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-01T15·14+0200
commitb8b571cfc1c2d31f2dea7d2a0209ec400660bf13 (patch)
treec093417093996089df24fba2f8af6cd05ab526b0
parentbc51175dc0c5f5e2106e73779663e9942dd451c4 (diff)
Include the cache.nixos.org signing key by default
-rw-r--r--perl/lib/Nix/Config.pm.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl/lib/Nix/Config.pm.in b/perl/lib/Nix/Config.pm.in
index 388acd2e61c0..b0dc71fab377 100644
--- a/perl/lib/Nix/Config.pm.in
+++ b/perl/lib/Nix/Config.pm.in
@@ -23,6 +23,8 @@ $useBindings = "@perlbindings@" eq "yes";
 
 %binaryCachePublicKeys = ();
 
+$defaultPublicKeys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=";
+
 sub readConfig {
     if (defined $ENV{'_NIX_OPTIONS'}) {
         foreach my $s (split '\n', $ENV{'_NIX_OPTIONS'}) {
@@ -41,7 +43,7 @@ sub readConfig {
         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;
         next unless defined $keyName && defined $publicKey;
         $binaryCachePublicKeys{$keyName} = decode_base64($publicKey);