add eleakxir

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-07-28 00:24:19 +02:00
parent c66fcbd709
commit 4932c2dd5e
3 changed files with 155 additions and 19 deletions

View File

@@ -8,6 +8,7 @@
enable = true;
port = 8080;
leakPath = "/mnt/ssd/leaks";
cachePath = "/var/lib/eleakxir-backend";
};
services.nginx = {
@@ -16,13 +17,21 @@
forceSSL = true;
root = "${
inputs.socme.packages.${pkgs.system}.eleakxir-frontend
inputs.eleakxir.packages.${pkgs.system}.frontend
}/eleakxir-frontend";
locations."/api/" = {
proxyPass = "http://127.0.0.1:${toString config.services.eleakxir-backend.port}/";
recommendedProxySettings = true;
extraConfig = ''
# Crucial for SSE: Disable buffering
proxy_buffering off;
proxy_cache off;
proxy_http_version 1.1;
proxy_set_header Connection ""; # Required for HTTP/1.1 persistent connections
proxy_read_timeout 36000s; # Long timeout, adjust as needed. SSE connections are long-lived.
proxy_send_timeout 36000s; # Also important for sending data
# Your existing rewrite rule (make sure this doesn't cause issues with SSE paths specifically)
rewrite ^/api/(.*) /$1 break;
'';
};