nixos-config/configs/porani/home-assistant/mqtt.nix
Ingolf Wagner 54bab918d7
init
2019-10-24 02:24:33 +02:00

27 lines
614 B
Nix

{
services.homeAssistantConfig.mqtt = {
# discovery = false;
# for mosquitto
broker = "127.0.0.1";
username = fileContents <secrets/home-assistant/mqtt-user>;
password = fileContents <secrets/home-assistant/mqtt-password>;
};
services.mosquitto = {
enable = true;
host = "0.0.0.0";
users = {
homeassistant = {
password = lib.fileContents <secrets/mosquitto/password>;
acl = [ "topic readwrite #" ];
};
zigbee = {
password = lib.fileContents <secrets/zigbee/password>;
acl = [ "topic readwrite #" ];
};
};
};
}