aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/machine/adm-omnia.nix1
-rw-r--r--nixos/machine/spt-omnia.nix1
-rw-r--r--nixos/modules/monitoring.nix13
3 files changed, 15 insertions, 0 deletions
diff --git a/nixos/machine/adm-omnia.nix b/nixos/machine/adm-omnia.nix
index 5fe2127..437831b 100644
--- a/nixos/machine/adm-omnia.nix
+++ b/nixos/machine/adm-omnia.nix
@@ -18,6 +18,7 @@ with lib; {
qca988x.interface = "wlp2s0";
};
openvpn.oldpersonal = false;
+ monitoring.speedtest = true;
};
services.pppd = {
diff --git a/nixos/machine/spt-omnia.nix b/nixos/machine/spt-omnia.nix
index e5d8873..bf72a6e 100644
--- a/nixos/machine/spt-omnia.nix
+++ b/nixos/machine/spt-omnia.nix
@@ -18,6 +18,7 @@ with lib; {
qca988x.interface = "wlp2s0";
};
openvpn.oldpersonal = true;
+ monitoring.speedtest = true;
};
networking.vlans."end2.848" = {
diff --git a/nixos/modules/monitoring.nix b/nixos/modules/monitoring.nix
index 2660461..e08ae14 100644
--- a/nixos/modules/monitoring.nix
+++ b/nixos/modules/monitoring.nix
@@ -20,6 +20,11 @@ in {
default = true;
description = "If hardware should be reported";
};
+ speedtest = mkOption {
+ type = types.bool;
+ default = false;
+ description = "If speedtest should be used to measure connection speed";
+ };
host = mkOption {
type = types.str;
@@ -87,6 +92,14 @@ in {
}
];
wireless = [{}];
+ }) // (optionaAttrs cnf.speedtest {
+ exec = [{
+ commands = ["${pkgs.speedtest-cli}/bin/speedtest --json"];
+ name_override = "speedtest";
+ timeout = "5m";
+ interval = "15m";
+ data_format = "json";
+ }];
});
};
};