about summary refs log tree commit diff
path: root/modules/services/grafana
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-01-07 13:35:14 -0800
committerFranck Cuny <franck@fcuny.net>2023-01-07 13:35:14 -0800
commit7556a3a399ba5b7d59604d9039cae644d61f2719 (patch)
tree8b1b8176b53236a698e798d878f069adf446671d /modules/services/grafana
parentfix(modules/gitea): a number of options have been renamed (diff)
downloadworld-7556a3a399ba5b7d59604d9039cae644d61f2719.tar.gz
fix(modules/grafana): a number of options have been renamed
Diffstat (limited to 'modules/services/grafana')
-rw-r--r--modules/services/grafana/default.nix17
1 files changed, 10 insertions, 7 deletions
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;
       };