about summary refs log tree commit diff
path: root/hosts/common/server
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-28 19:22:20 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-28 19:22:20 -0800
commit44987747a2e12f97fd19496d114c4dcc7cf6f643 (patch)
treec1a4a892816fc4ded021fd5c5b1d2025a4227177 /hosts/common/server
parentgrafana: initial configuration (diff)
downloadworld-44987747a2e12f97fd19496d114c4dcc7cf6f643.tar.gz
grafana: configure admin user and data sources
Diffstat (limited to 'hosts/common/server')
-rw-r--r--hosts/common/server/grafana.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/hosts/common/server/grafana.nix b/hosts/common/server/grafana.nix
index b2d7841..7af5256 100644
--- a/hosts/common/server/grafana.nix
+++ b/hosts/common/server/grafana.nix
@@ -1,9 +1,17 @@
 { config, lib, pkgs, ... }:
 
 {
-  grafana = {
+  services.grafana = {
     enable = true;
     # Bind to all interfaces.
     addr = "";
+    security.adminUser = "fcuny";
+
+    services.grafana.provision.datasources = [{
+      name = "prometheus";
+      isDefault = true;
+      type = "prometheus";
+      url = "http://localhost:9090";
+    }];
   };
 }