diff --git a/2configs/stats/telegraf/airsensor.nix b/2configs/stats/telegraf/airsensor.nix new file mode 100644 index 0000000..c0c64b2 --- /dev/null +++ b/2configs/stats/telegraf/airsensor.nix @@ -0,0 +1,15 @@ +{ pkgs, ...}: + +{ + services.telegraf.extraConfig.inputs.exec = [ + { + commands = [ "${pkgs.airsensor-py}/bin/airsensor-py"]; + timeout = "10s"; + data_format = "value"; + data_type = "integer"; + name_override = "airquality"; + interval = "10s"; + tags.unit="VOC"; + } + ]; +} diff --git a/2configs/stats/telegraf/default.nix b/2configs/stats/telegraf/default.nix index 4da6561..049a9c0 100644 --- a/2configs/stats/telegraf/default.nix +++ b/2configs/stats/telegraf/default.nix @@ -2,9 +2,6 @@ let url = "http://localhost:8086"; in { - imports = [ - ./europastats.nix - ]; services.telegraf = { enable = true; extraConfig = {