parent
							
								
									7347daba8c
								
							
						
					
					
						commit
						4bb38591e5
					
				
					 3 changed files with 4 additions and 15 deletions
				
			
		|  | @ -19,10 +19,6 @@ $useBindings = "@perlbindings@" eq "yes"; | ||||||
| 
 | 
 | ||||||
| %config = (); | %config = (); | ||||||
| 
 | 
 | ||||||
| %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'}) { | ||||||
|  | @ -40,12 +36,6 @@ sub readConfig { | ||||||
|         } |         } | ||||||
|         close CONFIG; |         close CONFIG; | ||||||
|     } |     } | ||||||
| 
 |  | ||||||
|     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); |  | ||||||
|     } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| return 1; | return 1; | ||||||
|  |  | ||||||
|  | @ -105,7 +105,9 @@ PublicKeys getDefaultPublicKeys() | ||||||
| 
 | 
 | ||||||
|     // FIXME: filter duplicates
 |     // FIXME: filter duplicates
 | ||||||
| 
 | 
 | ||||||
|     for (auto s : settings.get("binary-cache-public-keys", Strings())) { |     for (auto s : settings.get("binary-cache-public-keys", | ||||||
|  |             Strings{"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="})) | ||||||
|  |     { | ||||||
|         PublicKey key(s); |         PublicKey key(s); | ||||||
|         publicKeys.emplace(key.name, key); |         publicKeys.emplace(key.name, key); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -778,10 +778,7 @@ std::list<ref<Store>> getDefaultSubstituters() | ||||||
|         state->stores.push_back(openStore(uri)); |         state->stores.push_back(openStore(uri)); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     for (auto uri : settings.get("substituters", Strings())) |     for (auto uri : settings.get("substituters", settings.get("binary-caches", Strings{"https://cache.nixos.org/"}))) | ||||||
|         addStore(uri); |  | ||||||
| 
 |  | ||||||
|     for (auto uri : settings.get("binary-caches", Strings())) |  | ||||||
|         addStore(uri); |         addStore(uri); | ||||||
| 
 | 
 | ||||||
|     for (auto uri : settings.get("extra-binary-caches", Strings())) |     for (auto uri : settings.get("extra-binary-caches", Strings())) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue