chore: change filename format for paperless

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai 2024-09-03 01:53:38 +05:30
parent 381924aee1
commit abdeb98f11
Signed by: thunderbottom
GPG Key ID: 75507BE256F40CED

View File

@ -3,8 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
options.snowflake.services.paperless = { options.snowflake.services.paperless = {
enable = lib.mkEnableOption "Enable paperless service"; enable = lib.mkEnableOption "Enable paperless service";
@ -24,10 +23,9 @@
}; };
}; };
config = config = let
let cfg = config.snowflake.services.paperless;
cfg = config.snowflake.services.paperless; in
in
lib.mkIf cfg.enable { lib.mkIf cfg.enable {
age.secrets.paperless = { age.secrets.paperless = {
inherit (cfg.passwordFile) file; inherit (cfg.passwordFile) file;
@ -47,6 +45,7 @@
PAPEERLESS_TASK_WORKERS = 4; PAPEERLESS_TASK_WORKERS = 4;
PAPERLESS_THREADS_PER_WORKER = 4; PAPERLESS_THREADS_PER_WORKER = 4;
PAPERLESS_ADMIN_USER = cfg.adminUser; PAPERLESS_ADMIN_USER = cfg.adminUser;
PAPERLESS_FILENAME_FORMAT = "{created_year}/{document_type}/{title}";
}; };
}; };