diff --git a/modules/services/paperless-ngx.nix b/modules/services/paperless-ngx.nix new file mode 100644 index 0000000..4ab78b1 --- /dev/null +++ b/modules/services/paperless-ngx.nix @@ -0,0 +1,29 @@ +{ + services = { + paperless = { + enable = true; + consumptionDirIsPublic = true; + settings = { + PAPERLESS_CONSUMER_IGNORE_PATTERN = [ + ".DS_STORE/*" + "desktop.ini" + ]; + PAPERLESS_OCR_LANGUAGE = "deu+eng+nld"; + PAPERLESS_OCR_USER_ARGS = { + optimize = 1; + pdfa_image_compression = "lossless"; + }; + PAPERLESS_URL = "https://documents.liv.town"; + }; + }; + nginx.virtualHosts."documents.liv.town" = { + forceSSL = true; + sslCertificate = "/var/lib/acme/liv.town/cert.pem"; + sslCertificateKey = "/var/lib/acme/liv.town/key.pem"; + locations."/" = { + proxyPass = "http://127.0.0.1:28981"; + proxyWebsockets = true; + }; + }; + }; +}