From 87249a5408b608da7c83144ccb4abf7e06c5ba3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 13 Sep 2023 09:54:14 +0200 Subject: nixos/monitoring: cleanup --- nixos/modules/monitoring.nix | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/monitoring.nix b/nixos/modules/monitoring.nix index 36cd387..2fc6da5 100644 --- a/nixos/modules/monitoring.nix +++ b/nixos/modules/monitoring.nix @@ -6,8 +6,6 @@ }: with lib; let cnf = config.cynerd.monitoring; - inherit (config.networking) hostName; - isHost = cnf.host == hostName || hostName == "errol"; in { options.cynerd.monitoring = { enable = mkOption { @@ -25,17 +23,9 @@ in { default = false; description = "If speedtest should be used to measure connection speed"; }; - - host = mkOption { - type = types.str; - description = "Host name of the monitoring hosting system"; - readOnly = true; - }; }; config = mkMerge [ - {cynerd.monitoring.host = "lipwig";} - (mkIf cnf.enable { # Telegraf configuration services.telegraf = { @@ -127,14 +117,14 @@ in { ]; }) - (mkIf isHost { + (mkIf (config.networking.hostName == "lipwig") { # InfluxDB - services.influxdb2.enable = mkIf isHost true; + services.influxdb2.enable = true; services.telegraf.extraConfig.inputs.prometheus = { urls = ["http://localhost:8086/metrics"]; }; # Grafana - services.grafana = mkIf isHost { + services.grafana = { enable = true; settings = { users.allow_sign_up = false; -- cgit v1.2.3