fix: move paperless config to module

This commit is contained in:
Tim Schubert 2025-07-17 21:38:35 +02:00
parent f602f150ba
commit bdeb5584de
No known key found for this signature in database
3 changed files with 22 additions and 20 deletions

View file

@ -0,0 +1,20 @@
{ config }:
{
services.paperless = {
# TODO migrate DB
enable = true;
passwordFile = config.age.secrets.paperless.path;
};
systemd.tmpfiles.rules =
let
cfg = config.services.paperless;
in
[
(
if cfg.consumptionDirIsPublic then
"d '${cfg.consumptionDir}' 777 - - - -"
else
"d '${cfg.consumptionDir}' 770 ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
)
];
}