about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/grafana/default.nix17
-rw-r--r--modules/services/nginx/default.nix2
2 files changed, 11 insertions, 8 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;
       };
diff --git a/modules/services/nginx/default.nix b/modules/services/nginx/default.nix
index d93da7a..88e64ef 100644
--- a/modules/services/nginx/default.nix
+++ b/modules/services/nginx/default.nix
@@ -41,7 +41,7 @@ in
       }];
     };
 
-    services.grafana.provision.dashboards = [{
+    services.grafana.provision.dashboards.settings.providers = [{
       name = "NGINX";
       options.path = pkgs.nur.repos.alarsyo.grafanaDashboards.nginx;
       disableDeletion = true;