feat: installed flaresolverr
This commit is contained in:
		
							parent
							
								
									6afdcce951
								
							
						
					
					
						commit
						59dc4a7ee1
					
				
					 5 changed files with 58 additions and 0 deletions
				
			
		|  | @ -366,6 +366,10 @@ | ||||||
|       enable = true; |       enable = true; | ||||||
|       openFirewall = true; |       openFirewall = true; | ||||||
|     }; |     }; | ||||||
|  |     flaresolverr = { | ||||||
|  |       enable = true; | ||||||
|  |       openFirewall = true; | ||||||
|  |     }; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   # disable computer sleeping |   # disable computer sleeping | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
| 
 | 
 | ||||||
|     ./actual |     ./actual | ||||||
|     ./bazarr |     ./bazarr | ||||||
|  |     ./flaresolverr | ||||||
|     ./forgejo |     ./forgejo | ||||||
|     ./home-assistant |     ./home-assistant | ||||||
|     ./immich |     ./immich | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								modules/nixos-modules/server/flaresolverr/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								modules/nixos-modules/server/flaresolverr/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | ||||||
|  | {...}: { | ||||||
|  |   imports = [ | ||||||
|  |     ./proxy.nix | ||||||
|  |     ./impermanence.nix | ||||||
|  |   ]; | ||||||
|  | } | ||||||
							
								
								
									
										19
									
								
								modules/nixos-modules/server/flaresolverr/impermanence.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								modules/nixos-modules/server/flaresolverr/impermanence.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | { | ||||||
|  |   lib, | ||||||
|  |   config, | ||||||
|  |   ... | ||||||
|  | }: { | ||||||
|  |   config = lib.mkIf (config.services.flaresolverr.enable && config.host.impermanence.enable) { | ||||||
|  |     # FlareSolverr typically doesn't need persistent storage as it's a proxy service | ||||||
|  |     # but we'll add basic structure in case it's needed for logs or configuration | ||||||
|  |     environment.persistence."/persist/system/root" = { | ||||||
|  |       directories = [ | ||||||
|  |         { | ||||||
|  |           directory = "/var/lib/flaresolverr"; | ||||||
|  |           user = "flaresolverr"; | ||||||
|  |           group = "flaresolverr"; | ||||||
|  |         } | ||||||
|  |       ]; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										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