diff options
author | sefidel <contact@sefidel.net> | 2024-03-06 23:25:44 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2024-03-06 23:25:44 +0900 |
commit | db84f186018971798951377fa95ed20dfc43e88a (patch) | |
tree | dfc38a97ce4df428c9c75052204ec0dedf1dd8e8 /modules | |
parent | 784ed576aef48a5e06a532afd93e576c7673b25d (diff) | |
download | nixrc-db84f186018971798951377fa95ed20dfc43e88a.tar.gz nixrc-db84f186018971798951377fa95ed20dfc43e88a.zip |
feat(modules): add paperless
Diffstat (limited to 'modules')
-rw-r--r-- | modules/services/paperless.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/services/paperless.nix b/modules/services/paperless.nix new file mode 100644 index 0000000..8b2d6f2 --- /dev/null +++ b/modules/services/paperless.nix @@ -0,0 +1,30 @@ +{ config, lib, ... }: + +with lib; +let + cfg = config.modules.services.paperless; +in +{ + options.modules.services.paperless = { + enable = mkEnableOption "paperless"; + + realHost = mkOption { type = types.str; }; + + secrets = { + paperless-superuser-password = mkOption { type = types.path; }; + }; + }; + + config = mkIf cfg.enable { + services.paperless = rec { + enable = true; + + port = 4007; + + dataDir = "/smol/core/paperless"; + mediaDir = "${dataDir}/media"; + + passwordFile = cfg.secrets.paperless-superuser-password; + }; + }; +} |