Paperless Service @m3-atlas
This commit is contained in:
@ -16,6 +16,9 @@
|
||||
n8n-env = {
|
||||
file = ../../secrets/n8n-env.age;
|
||||
};
|
||||
paperless-key = {
|
||||
file = ../../secrets/paperless-key.age;
|
||||
};
|
||||
restreamer-env = {
|
||||
file = ../../secrets/restreamer-env.age;
|
||||
};
|
||||
|
@ -6,6 +6,7 @@
|
||||
./minio.nix
|
||||
./mysql.nix
|
||||
./n8n.nix
|
||||
./paperless.nix
|
||||
./postgres.nix
|
||||
./searx.nix
|
||||
./tailscale.nix
|
||||
|
38
hosts/m3-atlas/services/paperless.nix
Normal file
38
hosts/m3-atlas/services/paperless.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{config, ...}: {
|
||||
services.paperless = {
|
||||
enable = true;
|
||||
port = 3012;
|
||||
database.createLocally = true;
|
||||
passwordFile = config.age.secrets.paperless-key.path;
|
||||
settings = {
|
||||
PAPERLESS_URL = "https://pl.m3ta.dev";
|
||||
DATABASE_URL = "postgresql://paperless:paperless@localhost:5432/paperless";
|
||||
PAPERLESS_CONSUMER_IGNORE_PATTERN = [
|
||||
".DS_STORE/*"
|
||||
"desktop.ini"
|
||||
];
|
||||
PAPERLESS_OCR_LANGUAGE = "deu+eng";
|
||||
PAPERLESS_OCR_USER_ARGS = {
|
||||
optimize = 1;
|
||||
pdfa_image_compression = "lossless";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Traefik configuration for headscale
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.paperless.loadBalancer.servers = [
|
||||
{
|
||||
url = "http://localhost:3012/";
|
||||
}
|
||||
];
|
||||
routers.paperless = {
|
||||
rule = "Host(`pl.m3ta.dev`)";
|
||||
tls = {
|
||||
certResolver = "godaddy";
|
||||
};
|
||||
service = "paperless";
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user