2024-01-30 18:57:07 -05:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
2024-02-05 10:05:26 -05:00
|
|
|
lib,
|
2024-01-30 18:57:07 -05:00
|
|
|
...
|
2024-02-08 12:04:15 -05:00
|
|
|
}:
|
|
|
|
{
|
2024-01-30 18:57:07 -05:00
|
|
|
sops.secrets.paperless-pwd = {
|
|
|
|
owner = "paperless";
|
|
|
|
group = "paperless";
|
|
|
|
};
|
2024-02-05 10:05:26 -05:00
|
|
|
|
|
|
|
systemd.services = {
|
2024-02-08 12:04:15 -05:00
|
|
|
paperless-task-queue.serviceConfig = {
|
|
|
|
PrivateNetwork = false;
|
|
|
|
};
|
|
|
|
paperless-scheduler.serviceConfig = {
|
|
|
|
PrivateNetwork = lib.mkForce false;
|
|
|
|
};
|
2024-02-05 10:05:26 -05:00
|
|
|
};
|
|
|
|
|
2024-02-08 12:04:15 -05:00
|
|
|
services.paperless =
|
|
|
|
let
|
|
|
|
dataDir = "/var/lib/paperless-ngx";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
package = pkgs.paperless-ngx;
|
|
|
|
enable = true;
|
|
|
|
address = "0.0.0.0";
|
|
|
|
port = 28981;
|
|
|
|
passwordFile = config.sops.secrets.paperless-pwd.path;
|
|
|
|
dataDir = "${dataDir}";
|
|
|
|
mediaDir = "${dataDir}/media";
|
|
|
|
consumptionDir = "${dataDir}/consume";
|
|
|
|
settings = {
|
|
|
|
PAPERLESS_ADMIN_USER = "notoh";
|
|
|
|
PAPERLESS_REDIS = "redis://:paperless-ngx@192.168.1.211:6382";
|
|
|
|
PAPERLESS_EMAIL_TASK_CRON = "*/5 * * * *";
|
|
|
|
};
|
2024-01-30 18:57:07 -05:00
|
|
|
};
|
|
|
|
}
|