Compare commits
	
		
			2 commits
		
	
	
		
			4c94932490
			...
			2a7f905bc2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 2a7f905bc2 | ||
| a24c68d9db | 
					 4 changed files with 36 additions and 2 deletions
				
			
		|  | @ -3,6 +3,7 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./services/gitea.nix | ||||
|     ./services/hydra.nix | ||||
|     ./services/minecraft.nix | ||||
|     ./services/nextcloud.nix | ||||
|     ./services/webserver.nix | ||||
|  | @ -68,6 +69,7 @@ | |||
|       "${domain}" = host 3002 { serverAliases = [ "www.${domain}" ]; }; | ||||
|       "gitea.${domain}" = host 3000 { }; | ||||
|       "nextcloud.${domain}" = host 3001 { }; | ||||
|       "hydra.${domain}" = host config.services.hydra.port { }; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										16
									
								
								configuration/services/hydra.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								configuration/services/hydra.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { ... }: | ||||
| 
 | ||||
| { | ||||
|   services.hydra = { | ||||
|     enable = true; | ||||
|     port = 3003; | ||||
| 
 | ||||
|     hydraURL = "hydra.tlater.net"; | ||||
|     notificationSender = "hydra@tlater.net"; | ||||
|     extraConfig = '' | ||||
|       <gitea_authorization> | ||||
| 
 | ||||
|       </gitea_authorization> | ||||
|     ''; | ||||
|   }; | ||||
| } | ||||
|  | @ -34,6 +34,10 @@ | |||
| 
 | ||||
|     ports = [ "3002:3002" ]; | ||||
|     volumes = [ "tlaternet-mail:/srv/mail" ]; | ||||
|     extraOptions = [ "--hostname=tlater.net" ]; | ||||
|     extraOptions = [ | ||||
|       "--hostname=tlater.net" | ||||
|       # This can change with rocket 0.5. | ||||
|       "--stop-signal=SIGKILL" | ||||
|     ]; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										14
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -68,7 +68,7 @@ | |||
|             (import ./modules) | ||||
| 
 | ||||
|             (import ./configuration) | ||||
|             ({ lib, ... }: { | ||||
|             ({ config, lib, ... }: { | ||||
|               users.users.tlater.password = "insecure"; | ||||
| 
 | ||||
|               # Disable graphical tty so -curses works | ||||
|  | @ -78,6 +78,18 @@ | |||
|               # can easily test locally with the VM. | ||||
|               services.nginx.domain = lib.mkOverride 99 "localhost"; | ||||
| 
 | ||||
|               # Hydra uses X-Forwarded-Port to figure out how to | ||||
|               # include links to static files, but because we redirect | ||||
|               # 443 -> 3443 in the vm we need to explicitly set this | ||||
|               # (nginx can't see qemu's port redirection). | ||||
|               services.nginx.virtualHosts = | ||||
|                 let domain = config.services.nginx.domain; | ||||
|                 in { | ||||
|                   "hydra.${domain}".locations."/".extraConfig = '' | ||||
|                     proxy_set_header X-Forwarded-Port 3443; | ||||
|                   ''; | ||||
|                 }; | ||||
| 
 | ||||
|               # # Set up VM settings to match real VPS | ||||
|               # virtualisation.memorySize = 3941; | ||||
|               # virtualisation.cores = 2; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue