Feature: Paperless

This commit is contained in:
marthsincemelee
2024-03-10 21:09:49 +01:00
parent 0899f5ae70
commit 6ee162822e
2 changed files with 31 additions and 4 deletions
+8
View File
@@ -18,6 +18,14 @@ in
sonarr.enable = true;
jellyfin.enable = true;
jellyseerr.enable = true;
paperless = {
enable = true;
port = 28981; # Optional, to override the default port
extraConfig = {
PAPERLESS_ADMIN_USER = "finn";
PAPERLESS_OCR_LANGUAGE = "deu+eng";
};
};
prowlarr.enable = true;
};
+23 -4
View File
@@ -8,10 +8,29 @@ in
enable = mkEnableOption "Paperless Server";
port = mkOption {
type = types.port;
default = 28981;
example = 8081;
description = "Internal port for webui";
type = types.port;
default = 28981;
example = 8080;
description = "Internal port for webui";
};
extraConfig = mkOption {
type = types.attrs;
default = {};
example = { PAPERLESS_OCR_LANGUAGE = "deu+eng"; };
description = "Extra configuration options";
};
};
config = lib.mkIf cfg.enable {
services.paperless = {
enable = true;
address = "0.0.0.0";
dataDir = "/data/nfs/arr-data/documents/paperless";
#inherit (cfg) port extraConfig;
port = cfg.port;
extraConfig = cfg.extraConfig;
};
networking.firewall.allowedTCPPorts = [ cfg.port ];
};
}