From 28f1ed4a6a1cbf9b32904a010310e3da0f29b81b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 23 Mar 2023 12:29:28 +0100 Subject: nixos/monitoring: fix invalid function and measure speed on dean --- nixos/machine/dean.nix | 1 + nixos/modules/monitoring.nix | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'nixos') diff --git a/nixos/machine/dean.nix b/nixos/machine/dean.nix index 8fca4bf..4d35a9d 100644 --- a/nixos/machine/dean.nix +++ b/nixos/machine/dean.nix @@ -10,6 +10,7 @@ with lib; { openvpn = { oldpersonal = true; }; + monitoring.speedtest = true; }; networking = { diff --git a/nixos/modules/monitoring.nix b/nixos/modules/monitoring.nix index e08ae14..7a9e7b7 100644 --- a/nixos/modules/monitoring.nix +++ b/nixos/modules/monitoring.nix @@ -92,14 +92,17 @@ in { } ]; wireless = [{}]; - }) // (optionaAttrs cnf.speedtest { - exec = [{ - commands = ["${pkgs.speedtest-cli}/bin/speedtest --json"]; - name_override = "speedtest"; - timeout = "5m"; - interval = "15m"; - data_format = "json"; - }]; + }) + // (optionalAttrs cnf.speedtest { + exec = [ + { + commands = ["${pkgs.speedtest-cli}/bin/speedtest --json"]; + name_override = "speedtest"; + timeout = "5m"; + interval = "15m"; + data_format = "json"; + } + ]; }); }; }; -- cgit v1.2.3