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; + ''; + }; }; }; })