forked from fediversity/fediversity
		
	picked up from https://git.fediversity.eu/Fediversity/Fediversity/compare/main...niols:forgejo-ci. closes #356. Co-authored-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com> Reviewed-on: Fediversity/Fediversity#389 Reviewed-by: Nicolas Jeannerod <nicolas.jeannerod@moduscreate.com> Co-authored-by: Kiara Grouwstra <kiara@procolix.eu> Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
		
			
				
	
	
		
			47 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { pkgs, config, ... }:
 | |
| 
 | |
| {
 | |
|   _class = "nixos";
 | |
| 
 | |
|   services.gitea-actions-runner = {
 | |
|     package = pkgs.forgejo-actions-runner;
 | |
| 
 | |
|     instances.default = {
 | |
|       enable = true;
 | |
| 
 | |
|       name = config.networking.fqdn;
 | |
|       url = "https://git.fediversity.eu";
 | |
|       tokenFile = config.age.secrets.forgejo-runner-token.path;
 | |
| 
 | |
|       settings = {
 | |
|         log.level = "info";
 | |
|         runner = {
 | |
|           file = ".runner";
 | |
|           # Take only 1 job at a time to avoid clashing NixOS tests, see #362
 | |
|           capacity = 1;
 | |
|           timeout = "3h";
 | |
|           insecure = false;
 | |
|           fetch_timeout = "5s";
 | |
|           fetch_interval = "2s";
 | |
|         };
 | |
|       };
 | |
| 
 | |
|       ## This runner supports Docker (with a default Ubuntu image) and native
 | |
|       ## modes. In native mode, it contains a few default packages.
 | |
|       labels = [
 | |
|         "docker:docker://node:16-bullseye"
 | |
|         "native:host"
 | |
|       ];
 | |
| 
 | |
|       hostPackages = with pkgs; [
 | |
|         bash
 | |
|         git
 | |
|         nix
 | |
|         nodejs
 | |
|       ];
 | |
|     };
 | |
|   };
 | |
| 
 | |
|   ## For the Docker mode of the runner.
 | |
|   virtualisation.docker.enable = true;
 | |
| }
 |