feat(nginx): Switch to simpleProxies for the majority of configs

This commit is contained in:
Tom Hubrecht 2024-10-12 19:30:36 +02:00 committed by thubrecht
parent af61ae6e61
commit 2f06f22ac7
22 changed files with 180 additions and 263 deletions

View file

@ -9,6 +9,7 @@
let
inherit (lib) mapAttrsToList optionals;
host = "vote.dgnum.eu";
port = 9888;
python3 =
@ -168,25 +169,18 @@ in
};
};
services = {
postgresql = {
ensureDatabases = [ "kadenios" ];
ensureUsers = [
{
name = "kadenios";
ensureDBOwnership = true;
}
];
};
dgn-web.simpleProxies.kadenios = {
inherit host port;
vhostConfig.locations."/static/".root = staticDrv;
};
nginx.virtualHosts."vote.dgnum.eu" = {
enableACME = true;
forceSSL = true;
locations = {
"/".proxyPass = "http://127.0.0.1:${builtins.toString port}";
"/static/".root = staticDrv;
};
};
services.postgresql = {
ensureDatabases = [ "kadenios" ];
ensureUsers = [
{
name = "kadenios";
ensureDBOwnership = true;
}
];
};
}