add paperless
This commit is contained in:
		
							parent
							
								
									f8324e96e6
								
							
						
					
					
						commit
						0cafd83313
					
				
					 2 changed files with 37 additions and 0 deletions
				
			
		|  | @ -18,5 +18,6 @@ with lib; { | |||
|     ./msmtp.nix | ||||
|     ./kuma.nix | ||||
|     ./authentik.nix | ||||
|     ./paperless.nix | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										36
									
								
								sys/srv/paperless.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								sys/srv/paperless.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,36 @@ | |||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| with lib; { | ||||
|   services = { | ||||
|     nginx = { | ||||
|       virtualHosts."docs.posixlycorrect.com" = { | ||||
|         enableACME = true; | ||||
|         forceSSL = true; | ||||
|         extraConfig = '' | ||||
|           proxy_headers_hash_max_size 512; | ||||
|           proxy_headers_hash_bucket_size 128; | ||||
|         ''; | ||||
|         locations."/" = { | ||||
|           proxyPass = "http://127.0.0.1:28981"; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     paperless = { | ||||
|       enable = true; | ||||
|       user = "paperless"; | ||||
|       passwordFile = "/var/trust/paperless/passwordFile"; | ||||
|       openMPThreadingWorkaround = true; # see https://github.com/NixOS/nixpkgs/issues/240591 | ||||
|       address = "127.0.0.1"; | ||||
|       port = 28981; | ||||
|       settings = { | ||||
|         PAPERLESS_URL = "docs.posixlycorrect.com"; | ||||
|         PAPERLESS_OCR_LANGUAGE = "eng+spa"; | ||||
|         PAPERLESS_APP_TITLE = "posixlycorrect"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Reference in a new issue