about summary refs log tree commit diff
path: root/modules/services/grafana
diff options
context:
space:
mode:
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;
       };