feat: add paperless

This commit is contained in:
Felix Schröter 2021-12-22 13:03:14 +01:00
parent d888628e7b
commit e7e82ae2d6
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58
2 changed files with 24 additions and 0 deletions

22
services/paperless.nix Normal file
View file

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
let port = 28981;
in {
services.paperless-ng = {
enable = true;
inherit port;
passwordFile = "/etc/nixos/secrets/paperless";
extraConfig = { PAPERLESS_OCR_LANGUAGE = "deu+eng"; };
};
services.nginx = {
virtualHosts."paperless.felschr.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
proxyWebsockets = true;
};
};
};
}