reverse-proxy: Init new module to simplify nginx reverse proxies

This commit is contained in:
Katherina Walshe-Grey 2025-09-16 19:01:56 +01:00
parent 5967974d15
commit 12cfceb2f9
9 changed files with 67 additions and 113 deletions

View file

@ -13,18 +13,8 @@ in
};
config = mkIf cfg.enable {
services.nginx = {
enable = true;
virtualHosts = {
${cfg.domain} = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:5006/";
};
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
fountain.services.reverse-proxy.enable = true;
fountain.services.reverse-proxy.domains.${cfg.domain} = "http://127.0.0.1:5006/";
services.actual = {
enable = true;