From bbda84ca261397086f866ece115c4ec9111d4d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 16 Apr 2024 10:51:59 +0200 Subject: Try to improve the code --- nixos/modules/monitoring.nix | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'nixos/modules/monitoring.nix') diff --git a/nixos/modules/monitoring.nix b/nixos/modules/monitoring.nix index 44d0cbb..db77b00 100644 --- a/nixos/modules/monitoring.nix +++ b/nixos/modules/monitoring.nix @@ -119,22 +119,24 @@ in { (mkIf (config.networking.hostName == "lipwig") { # InfluxDB - services.influxdb2.enable = true; - services.telegraf.extraConfig.inputs.prometheus = { - urls = ["http://localhost:8086/metrics"]; - }; - # Grafana - services.grafana = { - enable = true; - settings = { - users.allow_sign_up = false; - security = { - admin_user = "cynerd"; - admin_password = "$__file{/run/secrets/grafana.admin.pass}"; - }; - server = { - http_addr = ""; - http_port = 3000; + services = { + influxdb2.enable = true; + telegraf.extraConfig.inputs.prometheus = { + urls = ["http://localhost:8086/metrics"]; + }; + # Grafana + grafana = { + enable = true; + settings = { + users.allow_sign_up = false; + security = { + admin_user = "cynerd"; + admin_password = "$__file{/run/secrets/grafana.admin.pass}"; + }; + server = { + http_addr = ""; + http_port = 3000; + }; }; }; }; -- cgit v1.2.3