summaryrefslogtreecommitdiff
path: root/hosts/p-body/nginx.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-05-19 11:19:55 -0400
committerseth <[email protected]>2023-05-19 11:19:55 -0400
commit8e5ce33b09eafb2b477d7b10f7a745b6189e0464 (patch)
tree033108059b9d263d0e8d8df7d3e0e58199eb12be /hosts/p-body/nginx.nix
parent44fef05d2e39060a32b61c0e2346b45803cddc77 (diff)
p-body: add grafana, loki, and prometheus
Diffstat (limited to 'hosts/p-body/nginx.nix')
-rw-r--r--hosts/p-body/nginx.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/hosts/p-body/nginx.nix b/hosts/p-body/nginx.nix
index ae1f251..3edd7b4 100644
--- a/hosts/p-body/nginx.nix
+++ b/hosts/p-body/nginx.nix
@@ -28,7 +28,10 @@ in {
virtualHosts = let
mkProxy = endpoint: port: {
- "${endpoint}".proxyPass = "http://127.0.0.1:${port}";
+ "${endpoint}" = {
+ proxyPass = "http://127.0.0.1:${port}";
+ proxyWebsockets = true;
+ };
};
in {
"${domain}" = {
@@ -69,6 +72,12 @@ in {
tryFiles = "$uri =404";
};
};
+
+ "grafana.${domain}" = {
+ enableACME = true;
+ serverAliases = ["www.grafana.${domain}"];
+ locations = mkProxy "/" "4000";
+ };
};
};
}