fuuko: Make co2 exporter more reliable

This also “fixes” a typo in the variable name.
This commit is contained in:
Simon Bruder 2023-06-28 12:53:29 +02:00
parent af20339f1b
commit 4a182ff522
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 6 additions and 1 deletions

View file

@ -4,5 +4,10 @@
services.co2_exporter = {
enable = true;
listenAddress = "${config.sbruder.wireguard.home.address}:9672"; # uses port numer of unrelated co2 exporter to avoid 8080
device = "/dev/airco2ntrol";
};
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="04d9", ATTRS{idProduct}=="a052", SYMLINK+="airco2ntrol"
'';
}

View file

@ -30,7 +30,7 @@ in
environment = {
CO2MONITOR_ADDRESS = cfg.listenAddress;
} // (lib.optionalAttrs (!isNull cfg.device) {
CO2MONITOR_DEVICE = cfg.device;
CO2MOINITOR_DEVICE = cfg.device; # MOINITOR ✓
});
serviceConfig = {
ExecStart = "${cfg.package}/bin/co2_exporter";