stockholm/makefu/2configs/stats/telegraf/airsensor.nix

20 lines
463 B
Nix
Raw Normal View History

2017-12-05 14:16:13 +00:00
{ pkgs, ...}:
{
2017-12-08 13:04:35 +00:00
services.udev.extraRules = ''
SUBSYSTEMS=="usb", ATTRS{product}=="iAQ Stick", GROUP="input"
'';
users.users.telegraf.extraGroups = [ "input" ];
2017-12-05 14:16:13 +00:00
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";
}
];
}