diff --git a/nixos/modules/monitoring/server/grafana.nix b/nixos/modules/monitoring/server/grafana.nix index d320907e8e71562b47829850ff85245c265d5040..eed9a1a6eb045ef1570cb2adb150482abea6c0b4 100644 --- a/nixos/modules/monitoring/server/grafana.nix +++ b/nixos/modules/monitoring/server/grafana.nix @@ -81,33 +81,33 @@ in { # Defend against DNS rebinding attacks. SERVER_ENFORCE_DOMAIN = "true"; }; - }; - services.grafana.auth = { - anonymous.org_role = "Admin"; - anonymous.org_name = "Main Org."; - } // grafanaAuth; + auth = { + anonymous.org_role = "Admin"; + anonymous.org_name = "Main Org."; + } // grafanaAuth; - services.grafana.provision = { - enable = true; - # See https://grafana.com/docs/grafana/latest/administration/provisioning/#datasources - datasources = [{ - name = "Prometheus"; - type = "prometheus"; - access = "proxy"; - url = cfg.prometheusUrl; - isDefault = true; - } { - name = "Loki"; - type = "loki"; - access = "proxy"; - url = cfg.lokiUrl; - }]; - # See https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards - dashboards = [{ - name = "provisioned"; - options.path = ./grafana-config; - }]; + provision = { + enable = true; + # See https://grafana.com/docs/grafana/latest/administration/provisioning/#datasources + datasources = [{ + name = "Prometheus"; + type = "prometheus"; + access = "proxy"; + url = cfg.prometheusUrl; + isDefault = true; + } { + name = "Loki"; + type = "loki"; + access = "proxy"; + url = cfg.lokiUrl; + }]; + # See https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards + dashboards = [{ + name = "provisioned"; + options.path = ./grafana-config; + }]; + }; }; # nginx reverse proxy