diff --git a/boxes/copernicus/services/grafana.nix b/boxes/copernicus/services/grafana.nix new file mode 100644 index 0000000..5eebd84 --- /dev/null +++ b/boxes/copernicus/services/grafana.nix @@ -0,0 +1,13 @@ +{ lib, config, pkgs, ...}: + +{ + services.grafana = { + settings = { + server = { + http_addr = "10.100.0.2"; + http_port = 9802; + domain = "grafana.beepboop.systems"; + }; + }; + }; +} diff --git a/boxes/netbox/grafana-bridge.nix b/boxes/netbox/grafana-bridge.nix new file mode 100644 index 0000000..83ce201 --- /dev/null +++ b/boxes/netbox/grafana-bridge.nix @@ -0,0 +1,16 @@ +{ lib, config, pkgs, ... }: +{ + services.nginx.virtualHosts."grafana.beepboop.systems" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://10.100.0.2:9802"; + proxyWebsockets = true; + extraConfig = '' + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_buffering off; + ''; + }; + }; +}