From db84f186018971798951377fa95ed20dfc43e88a Mon Sep 17 00:00:00 2001 From: sefidel Date: Wed, 6 Mar 2024 23:25:44 +0900 Subject: feat(modules): add paperless --- modules/services/paperless.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/services/paperless.nix 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; + }; + }; +} -- cgit 1.4.1