Merge pull request #286099 from Cynerd/mqtt2influxdb-package-fix

nixos/mqtt2influxdb: add missing package option
This commit is contained in:
Sandro 2024-06-10 13:46:24 +02:00 committed by GitHub
commit 41386672b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,6 +125,7 @@ in {
options = {
services.mqtt2influxdb = {
enable = mkEnableOption "BigClown MQTT to InfluxDB bridge.";
package = mkPackageOption pkgs ["python3Packages" "mqtt2influxdb"] {};
environmentFiles = mkOption {
type = types.listOf types.path;
default = [];
@ -245,7 +246,7 @@ in {
'';
serviceConfig = {
EnvironmentFile = cfg.environmentFiles;
ExecStart = "${cfg.package}/bin/mqtt2influxdb -dc ${finalConfig}";
ExecStart = "${lib.getExe cfg.package} -dc ${finalConfig}";
RuntimeDirectory = "mqtt2influxdb";
};
};