fuuko: Make co2 exporter more reliable
This also “fixes” a typo in the variable name.
This commit is contained in:
parent
af20339f1b
commit
4a182ff522
|
@ -4,5 +4,10 @@
|
||||||
services.co2_exporter = {
|
services.co2_exporter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listenAddress = "${config.sbruder.wireguard.home.address}:9672"; # uses port numer of unrelated co2 exporter to avoid 8080
|
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"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ in
|
||||||
environment = {
|
environment = {
|
||||||
CO2MONITOR_ADDRESS = cfg.listenAddress;
|
CO2MONITOR_ADDRESS = cfg.listenAddress;
|
||||||
} // (lib.optionalAttrs (!isNull cfg.device) {
|
} // (lib.optionalAttrs (!isNull cfg.device) {
|
||||||
CO2MONITOR_DEVICE = cfg.device;
|
CO2MOINITOR_DEVICE = cfg.device; # MOINITOR ✓
|
||||||
});
|
});
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/co2_exporter";
|
ExecStart = "${cfg.package}/bin/co2_exporter";
|
||||||
|
|
Loading…
Reference in a new issue