2024-12-13 22:18:30 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options.features.homelab.paperless.enable = mkEnableOption "Enable paperless";
|
|
|
|
|
|
|
|
config = mkIf config.features.homelab.paperless.enable {
|
2025-01-01 14:45:03 +00:00
|
|
|
services = {
|
|
|
|
paperless = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
PAPERLESS_URL = "https://paperless.opdavies.uk";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
caddy.virtualHosts."paperless.opdavies.uk" = {
|
|
|
|
useACMEHost = "opdavies.uk";
|
|
|
|
|
|
|
|
extraConfig = "reverse_proxy localhost:28981";
|
|
|
|
};
|
2024-12-13 22:18:30 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|