From 7556a3a399ba5b7d59604d9039cae644d61f2719 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 7 Jan 2023 13:35:14 -0800 Subject: fix(modules/grafana): a number of options have been renamed --- modules/services/grafana/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'modules/services/grafana') diff --git a/modules/services/grafana/default.nix b/modules/services/grafana/default.nix index b3f2122..46e75e1 100644 --- a/modules/services/grafana/default.nix +++ b/modules/services/grafana/default.nix @@ -16,18 +16,21 @@ in config = lib.mkIf cfg.enable { services.grafana = { enable = true; - security.adminUser = "fcuny"; - analytics.reporting.enable = false; - port = 4000; + settings = { + security.adminUser = "fcuny"; + analytics.reporting_enabled = false; + server.http_port = 4000; + server.http_addr = "127.0.0.1"; + }; provision = { enable = true; - datasources = [{ + datasources.settings.datasources = [{ name = "prometheus"; type = "prometheus"; isDefault = true; url = "http://localhost:9090"; }]; - dashboards = [{ + dashboards.settings.providers = [{ disableDeletion = true; options.path = ./dashboards; }]; @@ -50,8 +53,8 @@ in } ]; locations."/" = { - proxyPass = "http://${config.services.grafana.addr}:${ - toString config.services.grafana.port + proxyPass = "http://${config.services.grafana.settings.server.http_addr}:${ + toString config.services.grafana.settings.server.http_port }"; proxyWebsockets = true; }; -- cgit 1.4.1