Removes whitby DNS records and other related configuration that is no longer required now that whitby is gone. whitby served us well. RIP. This resolves b/433. Change-Id: I56fe6f88cde9112fc3bfc79758ac33e88a743422 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13117 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
		
			
				
	
	
		
			50 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
# Configuration for builderball, the Nix cache proxy for substituting between
 | 
						|
# builders.
 | 
						|
#
 | 
						|
# This is in experimental state, not yet supporting any dynamic private builders.
 | 
						|
{ depot, config, lib, ... }:
 | 
						|
 | 
						|
let
 | 
						|
  cfg = config.services.depot.builderball;
 | 
						|
  description = "Nix cache proxy for distribution between builders";
 | 
						|
  hostname = config.networing.hostName;
 | 
						|
in
 | 
						|
{
 | 
						|
  options.services.depot.builderball = {
 | 
						|
    enable = lib.mkEnableOption description;
 | 
						|
 | 
						|
    caches = lib.mkOption {
 | 
						|
      type = with lib.types; listOf string;
 | 
						|
      description = "Public addresses of caches to use";
 | 
						|
 | 
						|
      default = [
 | 
						|
        "nevsky.cache.tvl.fyi"
 | 
						|
      ];
 | 
						|
    };
 | 
						|
 | 
						|
    port = lib.mkOption {
 | 
						|
      type = lib.types.int;
 | 
						|
      description = "port on which to listen locally";
 | 
						|
      default = 26862; # bounc
 | 
						|
    };
 | 
						|
  };
 | 
						|
 | 
						|
  config = lib.mkIf cfg.enable {
 | 
						|
    systemd.services.builderball =
 | 
						|
      let
 | 
						|
        caches = lib.concatStringsSep " " (map (c: "-cache https://${c}") cfg.caches);
 | 
						|
      in
 | 
						|
      {
 | 
						|
        inherit description;
 | 
						|
        wantedBy = [ "multi-user.target" ];
 | 
						|
        wants = [ "network-online.target" ];
 | 
						|
        after = [ "network-online.target" ];
 | 
						|
 | 
						|
        serviceConfig = {
 | 
						|
          ExecStart = "${depot.ops.builderball}/bin/builderball ${caches} -port ${toString cfg.port} -debug";
 | 
						|
          DynamicUser = true;
 | 
						|
          Restart = "always";
 | 
						|
        };
 | 
						|
      };
 | 
						|
  };
 | 
						|
}
 |