nixfleet/modules/paperless/default.nix
Andrea Ciceri a394b9cefd
All checks were successful
/ test (push) Successful in 32s
Reformat everything
2024-09-20 11:37:17 +02:00

25 lines
632 B
Nix

{ config, ... }:
{
services.paperless = {
enable = true;
address = "0.0.0.0";
passwordFile = builtins.toFile "paperless-initial-password" "paperless";
mediaDir = "/mnt/hd/paperless/media";
consumptionDir = "/mnt/hd/paperless/consume";
settings = {
PAPERLESS_OCR_LANGUAGE = "ita+eng";
PAPERLESS_CONSUMER_IGNORE_PATTERN = builtins.toJSON [
".DS_STORE/*"
"desktop.ini"
];
PAPERLESS_OCR_USER_ARGS = builtins.toJSON {
optimize = 1;
pdfa_image_compression = "lossless";
};
};
};
backup.paths = [
config.services.paperless.dataDir
];
}