From 10d7e7a560b4ae17e9c2df26080f4555c9719833 Mon Sep 17 00:00:00 2001 From: xqtc161 Date: Sat, 30 Mar 2024 20:52:03 +0100 Subject: [PATCH] seraphim: grafana --- hosts/x86_64-linux/seraphim/monitoring.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 hosts/x86_64-linux/seraphim/monitoring.nix diff --git a/hosts/x86_64-linux/seraphim/monitoring.nix b/hosts/x86_64-linux/seraphim/monitoring.nix new file mode 100644 index 0000000..6a08f3e --- /dev/null +++ b/hosts/x86_64-linux/seraphim/monitoring.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: { + # grafana configuration + services.grafana = { + enable = true; + # domain = "grafana"; + port = 2342; + addr = "127.0.0.1"; + }; + + # nginx reverse proxy + services.nginx.virtualHosts.${config.services.grafana.domain} = { + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}"; + proxyWebsockets = true; + }; + }; +}