Add mqtt-topic option

This commit is contained in:
niten 2023-03-21 09:20:15 -07:00
parent 0bfa3c856f
commit cacfe8330f
1 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,11 @@ in {
description =
"File (on the local host) containing the password for the MQTT server.";
};
topic = mkOption {
type = str;
description = "MQTT topic on which to publish events.";
};
};
};
@ -114,6 +119,7 @@ in {
"--mqtt-port=${toString cfg.mqtt-client.port}"
"--mqtt-user=${cfg.mqtt-client.username}"
"--mqtt-password-file=$CREDENTIALS_DIRECTORY/mqtt.passwd"
"--mqtt-topic=${cfg.mqtt-client.topic}"
"--objectifier-host=${cfg.objectifier-client.host}"
"--objectifier-port=${toString cfg.objectifier-client.port}"
] ++ (optional cfg.verbose "--verbose")));