nix-config/hosts/nixedo/modules/paperless.nix

31 lines
588 B
Nix
Raw Normal View History

2025-04-19 11:45:23 +01:00
{ config, ... }:
{
services =
let
cfg = config.services.paperless;
hostname = "paperless.oliverdavies.uk";
in
{
paperless = {
enable = true;
dataDir = "/mnt/media/paperless";
2025-01-20 17:52:44 +00:00
settings = {
PAPERLESS_URL = "https://${hostname}";
};
};
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;
};
};
};
}