Refactored subdomains creation

This commit is contained in:
Julien Malka 2021-12-29 17:40:57 +01:00
parent f6b29709c5
commit be4fce11f4
No known key found for this signature in database
GPG key ID: 3C68E13964FEA07F
11 changed files with 28 additions and 103 deletions

View file

@ -37,17 +37,7 @@ in
};
}
(mkIf cfg.nginx.enable {
luj.nginx.enable = true;
services.nginx.virtualHosts."${cfg.nginx.subdomain}.julienmalka.me" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
};
};
})]);
(mkIf cfg.nginx.enable (mkSubdomain cfg.nginx.subdomain port) )]);