rainbow: add gitlab runner
This commit is contained in:
		
							parent
							
								
									74de7c937f
								
							
						
					
					
						commit
						2fa47a81a7
					
				
					 5 changed files with 103 additions and 2 deletions
				
			
		
							
								
								
									
										36
									
								
								hosts/double-rainbow/gitlab-runner.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								hosts/double-rainbow/gitlab-runner.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
{
 | 
			
		||||
  config,
 | 
			
		||||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
let
 | 
			
		||||
  inherit (pkgs.callPackage ../../system/gitlab-runner.nix { }) mkNixRunnerFull;
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  boot.kernel.sysctl."net.ipv4.ip_forward" = true;
 | 
			
		||||
  virtualisation.docker.enable = true;
 | 
			
		||||
  services.gitlab-runner = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    settings.concurrent = 4;
 | 
			
		||||
    services = {
 | 
			
		||||
      wopus-gitlab-nix = mkNixRunnerFull {
 | 
			
		||||
        authenticationTokenConfigFile = config.sops.secrets."gitlab-runners/wopus-gitlab-nix".path;
 | 
			
		||||
        nixCacheSshPrivateKeyPath = config.sops.secrets."gitlab-runners/wopus-ssh-nix-cache-pk".path;
 | 
			
		||||
        nixCacheSshPublicKeyPath = config.sops.secrets."gitlab-runners/wopus-ssh-nix-cache-pub".path;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  systemd.services.gitlab-runner.serviceConfig.Nice = 10;
 | 
			
		||||
 | 
			
		||||
  sops.secrets = {
 | 
			
		||||
    "gitlab-runners/wopus-gitlab-nix" = {
 | 
			
		||||
      sopsFile = ../../secrets/double-rainbow/default.yaml;
 | 
			
		||||
    };
 | 
			
		||||
    "gitlab-runners/wopus-ssh-nix-cache-pk" = {
 | 
			
		||||
      sopsFile = ../../secrets/double-rainbow/default.yaml;
 | 
			
		||||
    };
 | 
			
		||||
    "gitlab-runners/wopus-ssh-nix-cache-pub" = {
 | 
			
		||||
      sopsFile = ../../secrets/double-rainbow/default.yaml;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue