2025-04-19 11:45:23 +01:00
|
|
|
{ config, ... }:
|
2024-12-13 22:18:30 +00:00
|
|
|
|
|
|
|
{
|
2025-04-28 00:23:46 +01:00
|
|
|
services =
|
|
|
|
let
|
|
|
|
cfg = config.services.paperless;
|
|
|
|
hostname = "paperless.oliverdavies.uk";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
paperless = {
|
|
|
|
enable = true;
|
2025-01-01 14:45:03 +00:00
|
|
|
|
2025-04-28 00:23:46 +01:00
|
|
|
dataDir = "/mnt/media/paperless";
|
2025-01-20 17:52:44 +00:00
|
|
|
|
2025-04-28 00:23:46 +01:00
|
|
|
settings = {
|
|
|
|
PAPERLESS_URL = "https://${hostname}";
|
|
|
|
};
|
2025-01-01 14:45:03 +00:00
|
|
|
};
|
|
|
|
|
2025-04-28 00:23:46 +01:00
|
|
|
nginx.virtualHosts."${hostname}" = {
|
|
|
|
forceSSL = true;
|
|
|
|
useACMEHost = "oliverdavies.uk";
|
|
|
|
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:${toString cfg.port}";
|
2025-04-28 02:07:10 +01:00
|
|
|
recommendedProxySettings = true;
|
2025-04-28 00:23:46 +01:00
|
|
|
};
|
|
|
|
};
|
2024-12-13 22:18:30 +00:00
|
|
|
};
|
|
|
|
}
|