feat: installed flaresolverr
This commit is contained in:
		
							parent
							
								
									6afdcce951
								
							
						
					
					
						commit
						59dc4a7ee1
					
				
					 5 changed files with 58 additions and 0 deletions
				
			
		
							
								
								
									
										28
									
								
								modules/nixos-modules/server/flaresolverr/proxy.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								modules/nixos-modules/server/flaresolverr/proxy.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   options.services.flaresolverr = { | ||||
|     subdomain = lib.mkOption { | ||||
|       type = lib.types.nullOr lib.types.str; | ||||
|       default = null; | ||||
|       description = "Subdomain for reverse proxy. If null, service will be local only."; | ||||
|     }; | ||||
|     extraSubdomains = lib.mkOption { | ||||
|       type = lib.types.listOf lib.types.str; | ||||
|       default = []; | ||||
|       description = "Extra subdomains for reverse proxy."; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   config = lib.mkIf (config.services.flaresolverr.enable && config.services.flaresolverr.subdomain != null) { | ||||
|     host.reverse_proxy.subdomains.flaresolverr = { | ||||
|       subdomain = config.services.flaresolverr.subdomain; | ||||
|       extraSubdomains = config.services.flaresolverr.extraSubdomains; | ||||
|       target = "http://127.0.0.1:${toString config.services.flaresolverr.port}"; | ||||
|       websockets.enable = true; | ||||
|       forwardHeaders.enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue