about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/grafana.emile.space.nix
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-09-13 15:04:06 +0200
committerEmile <git@emile.space>2024-09-13 15:04:06 +0200
commit35d6c2c70824cf77ef2216889cc9730b622f5ac1 (patch)
tree2435a97f87409deb57c279fb41534e0d10c901ca /nix/hosts/corrino/www/grafana.emile.space.nix
parent902c97cf9aa16c5bb4a45b28f182e4d6033156e7 (diff)
big push
Diffstat (limited to 'nix/hosts/corrino/www/grafana.emile.space.nix')
-rw-r--r--nix/hosts/corrino/www/grafana.emile.space.nix24
1 files changed, 18 insertions, 6 deletions
diff --git a/nix/hosts/corrino/www/grafana.emile.space.nix b/nix/hosts/corrino/www/grafana.emile.space.nix
index 3464421..eaf88b5 100644
--- a/nix/hosts/corrino/www/grafana.emile.space.nix
+++ b/nix/hosts/corrino/www/grafana.emile.space.nix
@@ -2,12 +2,22 @@
 
 {
   services = {
-    nginx.virtualHosts."grafana.emile.space" = {
-      addSSL = true;
-      enableACME = true;
-      locations."/" = {
-          proxyPass = "http://${toString config.services.grafana.settings.server.http_addr}:${toString config.services.grafana.settings.server.http_port}/";
-          proxyWebsockets = true;
+    nginx.virtualHosts = {
+      "grafana.emile.space" = {
+        addSSL = true;
+        enableACME = true;
+        locations."/" = {
+            proxyPass = "http://${toString config.services.grafana.settings.server.http_addr}:${toString config.services.grafana.settings.server.http_port}/";
+            proxyWebsockets = true;
+        };
+      };
+      "prometheus.emile.space" = {
+        addSSL = true;
+        enableACME = true;
+        locations."/" = {
+            proxyPass = "http://${config.services.prometheus.listenAddress}:${toString config.services.prometheus.port}/";
+            proxyWebsockets = true;
+        };
       };
     };
 
@@ -47,6 +57,8 @@
     prometheus = {
       enable = true;
       retentionTime = "356d";
+
+      listenAddress = "[::1]";
       port = config.emile.ports.prometheus;
 
       exporters = {