forked from jan-leila/nix-config
		
	refactor: moved reverse proxy into own section in server modules
This commit is contained in:
		
							parent
							
								
									663bdcc012
								
							
						
					
					
						commit
						52801b4bb7
					
				
					 7 changed files with 142 additions and 119 deletions
				
			
		|  | @ -24,17 +24,6 @@ in { | |||
|   config = lib.mkIf config.services.paperless.enable (lib.mkMerge [ | ||||
|     { | ||||
|       host = { | ||||
|         reverse_proxy.subdomains.${config.services.paperless.subdomain} = { | ||||
|           target = "http://${config.services.paperless.address}:${toString config.services.paperless.port}"; | ||||
| 
 | ||||
|           websockets.enable = true; | ||||
|           forwardHeaders.enable = true; | ||||
| 
 | ||||
|           extraConfig = '' | ||||
|             # allow large file uploads | ||||
|             client_max_body_size 50000M; | ||||
|           ''; | ||||
|         }; | ||||
|         postgres = { | ||||
|           enable = true; | ||||
|           extraUsers = { | ||||
|  | @ -61,6 +50,21 @@ in { | |||
|         }; | ||||
|       }; | ||||
|     } | ||||
|     (lib.mkIf config.host.reverse_proxy.enable { | ||||
|       host = { | ||||
|         reverse_proxy.subdomains.${config.services.paperless.subdomain} = { | ||||
|           target = "http://${config.services.paperless.address}:${toString config.services.paperless.port}"; | ||||
| 
 | ||||
|           websockets.enable = true; | ||||
|           forwardHeaders.enable = true; | ||||
| 
 | ||||
|           extraConfig = '' | ||||
|             # allow large file uploads | ||||
|             client_max_body_size 50000M; | ||||
|           ''; | ||||
|         }; | ||||
|       }; | ||||
|     }) | ||||
|     (lib.mkIf config.services.fail2ban.enable { | ||||
|       environment.etc = { | ||||
|         "fail2ban/filter.d/paperless.local".text = ( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue