summaryrefslogtreecommitdiff
path: root/hosts/p-body/nginx.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/p-body/nginx.nix')
-rw-r--r--hosts/p-body/nginx.nix28
1 files changed, 16 insertions, 12 deletions
diff --git a/hosts/p-body/nginx.nix b/hosts/p-body/nginx.nix
index b2dae30..1d491d2 100644
--- a/hosts/p-body/nginx.nix
+++ b/hosts/p-body/nginx.nix
@@ -21,20 +21,24 @@ in {
proxyWebsockets = true;
};
};
- in {
- "api.${domain}" = {
- enableACME = true;
- addSSL = true;
- locations = mkProxy "/" "8080";
- };
-
- "grafana.${domain}" = {
- enableACME = true;
- addSSL = true;
+ mkVHosts = builtins.mapAttrs (_: v:
+ v
+ // {
+ enableACME = true;
+ # workaround for https://github.com/NixOS/nixpkgs/issues/210807
+ acmeRoot = null;
+ forceSSL = true;
+ });
+ in
+ mkVHosts {
+ "api.${domain}" = {
+ locations = mkProxy "/" "8080";
+ };
- locations = mkProxy "/" "4000";
+ "grafana.${domain}" = {
+ locations = mkProxy "/" "4000";
+ };
};
- };
};
}