diff --git a/hosts/rico1/services/apps/blocky.nix b/hosts/rico1/services/apps/blocky.nix index ab28600..5b43117 100644 --- a/hosts/rico1/services/apps/blocky.nix +++ b/hosts/rico1/services/apps/blocky.nix @@ -77,7 +77,7 @@ in "alertmanager.labs.adtya.xyz" = "10.10.10.11"; "blocky.labs.adtya.xyz" = "10.10.10.11"; "frp.labs.adtya.xyz" = "10.10.10.10"; - "grafana.labs.adtya.xyz" = "10.10.10.10"; + "grafana.labs.adtya.xyz" = "10.10.10.11"; "loki.labs.adtya.xyz" = "10.10.10.11"; "prometheus.labs.adtya.xyz" = "10.10.10.10"; "transmission.labs.adtya.xyz" = "10.10.10.14"; diff --git a/hosts/rico1/services/apps/default.nix b/hosts/rico1/services/apps/default.nix index a32782c..b772e72 100644 --- a/hosts/rico1/services/apps/default.nix +++ b/hosts/rico1/services/apps/default.nix @@ -5,6 +5,7 @@ _: { ./wiki.nix ./alertmanager.nix ./blocky.nix + ./grafana.nix ./loki ../../../shared/prometheus-exporters.nix ../../../shared/promtail.nix diff --git a/hosts/rico1/services/apps/grafana.nix b/hosts/rico1/services/apps/grafana.nix new file mode 100644 index 0000000..4e4c3e6 --- /dev/null +++ b/hosts/rico1/services/apps/grafana.nix @@ -0,0 +1,33 @@ +_: +let + inherit (import ../../../shared/caddy-helpers.nix) logFormat; + domainName = "grafana.labs.adtya.xyz"; +in +{ + services = { + caddy = { + virtualHosts."${domainName}" = { + logFormat = logFormat domainName; + extraConfig = '' + reverse_proxy 127.0.0.1:9091 + ''; + }; + }; + grafana = { + enable = true; + settings = { + server = { + domain = domainName; + http_addr = "127.0.0.1"; + http_port = 9091; + }; + analytics = { + enable = false; + }; + panels = { + disable_sanitize_html = true; + }; + }; + }; + }; +}