Configures an experimental setup for a builderball-based public cache. This cache only includes the two build machines (whitby & nevsky), for the time period where both of them exist simultaneously. The idea is this: All participating hosts run a harmonia binary cache locally (whitby already does). They then run builderball instances pointing at each other's harmonia caches (through dedicated public hostnames). When a request comes in, the first matching cache address is returned and Nix will substitute from there. Change-Id: Ia7d5357fd5e04f77b460205544fa24e82b100230 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12975 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			448 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			448 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { config, ... }:
 | |
| 
 | |
| {
 | |
|   imports = [
 | |
|     ./base.nix
 | |
|   ];
 | |
| 
 | |
|   config = {
 | |
|     services.nginx.virtualHosts."cache.tvl.su" = {
 | |
|       serverName = "cache.tvl.su";
 | |
|       enableACME = true;
 | |
|       forceSSL = true;
 | |
| 
 | |
|       extraConfig = ''
 | |
|         location = /cache-key.pub {
 | |
|           alias /run/agenix/nix-cache-pub;
 | |
|         }
 | |
| 
 | |
|         location / {
 | |
|           proxy_pass http://${config.services.depot.harmonia.settings.bind};
 | |
|         }
 | |
|       '';
 | |
|     };
 | |
|   };
 | |
| }
 |