forked from jan-leila/nix-config
		
	refactor: split server modules into smaller more manageable files
This commit is contained in:
		
							parent
							
								
									b2e5ae1f98
								
							
						
					
					
						commit
						cdeb4e108b
					
				
					 49 changed files with 1519 additions and 1270 deletions
				
			
		
							
								
								
									
										24
									
								
								modules/nixos-modules/server/home-assistant/proxy.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								modules/nixos-modules/server/home-assistant/proxy.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: | ||||
| lib.mkIf (config.host.reverse_proxy.enable && config.services.home-assistant.enable) { | ||||
|   host = { | ||||
|     reverse_proxy.subdomains.${config.services.home-assistant.subdomain} = { | ||||
|       target = "http://localhost:${toString config.services.home-assistant.config.http.server_port}"; | ||||
| 
 | ||||
|       websockets.enable = true; | ||||
|       forwardHeaders.enable = true; | ||||
| 
 | ||||
|       extraConfig = '' | ||||
|         add_header Upgrade $http_upgrade; | ||||
|         add_header Connection \"upgrade\"; | ||||
| 
 | ||||
|         proxy_buffering off; | ||||
| 
 | ||||
|         proxy_read_timeout 90; | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue