service/paperless: move custom folder setting to device

This commit is contained in:
Felix Buehler 2023-09-05 22:19:45 +02:00
parent b4cc0204df
commit c7a56294a4
2 changed files with 8 additions and 2 deletions

View file

@ -72,6 +72,7 @@ in
enable = true;
passwordFile = secrets."paperless/password".path;
extraConfig.PAPERLESS_ADMIN_USER = "felix";
mediaDir = "/srv/data/docs";
};
# RSS aggregator and reader
freshrss = {

View file

@ -21,6 +21,12 @@ in
description = "Internal port for webui";
};
mediaDir = mkOption {
type = types.path;
description = "Password for the defaultUser for FreshRSS.";
example = "/run/secrets/freshrss";
};
extraConfig = mkOption {
type = types.attrs;
default = { };
@ -31,8 +37,7 @@ in
config = lib.mkIf cfg.enable {
services.paperless = {
enable = true;
inherit (cfg) port;
mediaDir = "/srv/data/docs";
inherit (cfg) port mediaDir;
extraConfig = {
PAPERLESS_OCR_LANGUAGE = "deu+eng";
} // cfg.extraConfig;