diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 84b92e2..6ff0531 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -76,6 +76,47 @@ in { proxyPass = "http://127.0.0.1:8009"; }; }; + "grafana.stitchy.moe" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:3000"; + }; + extraConfig = '' + allow 10.100.0.0/24; + allow 192.168.51.2; + allow 192.168.51.1; + deny all; + ''; + }; + }; + }; + + services = { + grafana = { + enable = true; + }; + prometheus = { + enable = true; + exporters = { + node = { + enable = true; + }; + }; + globalConfig.scrape_interval = "10s"; + scrapeConfigs = [{ + job_name = "node"; + static_configs = [{ + targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}"]; + }]; + } + { + job_name = "dendrite"; + static_configs = [{ + targets = [ "localhost:9008"]; + }]; + } + ]; }; };