From f5f2198da113394bc14e0bfad4e4aaa9ec038033 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 23 Nov 2025 14:04:46 +0530 Subject: Paperless --- modules/network/default.nix | 1 + modules/storage/default.nix | 1 + modules/storage/docs.nix | 15 +++++++++++++++ modules/storage/syncthing.nix | 5 +++++ 4 files changed, 22 insertions(+) create mode 100644 modules/storage/docs.nix (limited to 'modules') diff --git a/modules/network/default.nix b/modules/network/default.nix index f2dae8a..a601750 100644 --- a/modules/network/default.nix +++ b/modules/network/default.nix @@ -33,6 +33,7 @@ in "photos.local" = { inherit host; port = ports.immich; }; "news.local" = { inherit host; port = ports.yarr; }; "librarian.local" = { inherit host; port = ports.lazylibrarian; }; + "paperless.local" = { inherit host; port = ports.paperless; configureNginx = true; }; }; }; diff --git a/modules/storage/default.nix b/modules/storage/default.nix index d4e8da9..f0c9af8 100644 --- a/modules/storage/default.nix +++ b/modules/storage/default.nix @@ -5,5 +5,6 @@ ./immich.nix ./send.nix ./syncthing.nix + ./docs.nix ]; } diff --git a/modules/storage/docs.nix b/modules/storage/docs.nix new file mode 100644 index 0000000..7ea4fad --- /dev/null +++ b/modules/storage/docs.nix @@ -0,0 +1,15 @@ +{ settings, lib, ... }: +{ + services.paperless = { + enable = true; + user = settings.paperless.user; + address = "0.0.0.0"; + database.createLocally = true; + port = settings.network.ports.paperless; + consumptionDir = settings.paperless.docsDir; + consumptionDirIsPublic = true; + settings = { + PAPERLESS_URL = lib.mkForce "http://paperless.local"; + }; + }; +} diff --git a/modules/storage/syncthing.nix b/modules/storage/syncthing.nix index 982ee71..27db72b 100644 --- a/modules/storage/syncthing.nix +++ b/modules/storage/syncthing.nix @@ -32,6 +32,11 @@ in path = settings.media.booksDir; devices = lib.attrNames settings.syncthing.devices; }; + artemis-docs = { + label = "Documents"; + path = settings.paperless.docsDir; + devices = lib.attrNames settings.syncthing.devices; + }; }; overrideDevices = false; -- cgit v1.3.1