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

View file

@ -26,6 +26,7 @@ in with builtins; {
./services/home-assistant.nix
./services/owntracks.nix
./services/miniflux.nix
./services/paperless.nix
];
nixpkgs.config.allowUnfree = true;
@ -71,6 +72,7 @@ in with builtins; {
"mqtt.felschr.com"
"owntracks.felschr.com"
"etebase.felschr.com"
"paperless.felschr.com"
];
};

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;
};
};
};
}