feat: add paperless ngx service
This commit is contained in:
parent
9c9acc3494
commit
1ef3eb3360
4 changed files with 44 additions and 2 deletions
32
system/modules/paperless-ngx.nix
Normal file
32
system/modules/paperless-ngx.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
domain ? "localhost",
|
||||
passwordFile,
|
||||
}:
|
||||
{ config, ... }:
|
||||
{
|
||||
services.paperless = {
|
||||
enable = true;
|
||||
passwordFile = passwordFile;
|
||||
consumptionDirIsPublic = true;
|
||||
settings = {
|
||||
PAPERLESS_CONSUMER_IGNORE_PATTERN = [
|
||||
".DS_STORE/*"
|
||||
"desktop.ini"
|
||||
];
|
||||
PAPERLESS_OCR_LANGUAGE = "chi_tra+eng";
|
||||
PAPERLESS_OCR_USER_ARGS = {
|
||||
optimize = 1;
|
||||
pdfa_image_compression = "lossless";
|
||||
};
|
||||
PAPERLESS_URL = "https://${domain}";
|
||||
};
|
||||
configureTika = true;
|
||||
database.createLocally = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://localhost:${toString config.services.paperless.port}";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue