From 4058d5aa2f21e1290adf0a0280f1652d780b081d Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Wed, 13 Aug 2025 10:33:36 +0100 Subject: [PATCH] feat(llm): add docling-serve service and reverse proxy configuration --- modules/services/llm/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/services/llm/default.nix b/modules/services/llm/default.nix index d6c9512..e04feba 100644 --- a/modules/services/llm/default.nix +++ b/modules/services/llm/default.nix @@ -61,6 +61,11 @@ in environmentVariables = cfg.environmentVariables; }; + services.docling-serve = { + enable = true; + package = pkgs.unstablePkgs.docling-serve; + }; + pepe.core.vhost.hosts = optionalAttrs (cfg.backendDomain != null) { "${cfg.backendDomain}" = { locations."/" = { @@ -76,6 +81,21 @@ in proxy_set_header Host localhost:${toString config.services.ollama.port}; ''; }; + + locations."/docling/" = { + host = config.services.docling-serve.host; + port = config.services.docling-serve.port; + allowLAN = true; + allowVPN = true; + allowWAN = true; + recommendedProxySettings = false; + extraConfig = '' + proxy_buffering off; + proxy_read_timeout 600s; + + rewrite ^/docling/(.*) /$1 break; + ''; + }; }; }; })