mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
testing eleakxir prod
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
37
server-modules/eleakxir.nix
Normal file
37
server-modules/eleakxir.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.eleakxir-backend = {
|
||||
enable = true;
|
||||
port = 8080;
|
||||
leakPath = "/mnt/ssd/leaks";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
virtualHosts."eleakxir.hadi.diy" = {
|
||||
useACMEHost = "hadi.diy";
|
||||
forceSSL = true;
|
||||
|
||||
root = "${
|
||||
inputs.socme.packages.${pkgs.system}.eleakxir-frontend
|
||||
}/eleakxir-frontend";
|
||||
|
||||
locations."/api/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.eleakxir-backend.port}/";
|
||||
recommendedProxySettings = true;
|
||||
extraConfig = ''
|
||||
rewrite ^/api/(.*) /$1 break;
|
||||
'';
|
||||
};
|
||||
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
try_files $uri $uri/ /index.html =404; # Fallback vers index.html pour les routes SPA
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user