nixos-config/nixos/machines/pepe/home-assistant/mqtt.nix

32 lines
738 B
Nix
Raw Normal View History

2020-04-09 16:51:39 +02:00
{ lib, ... }: {
2020-04-08 16:43:09 +02:00
services.homeAssistantConfig.mqtt = {
2020-04-09 16:51:39 +02:00
# discovery = false;
2020-04-08 16:43:09 +02:00
# for mosquitto
broker = "127.0.0.1";
username = lib.fileContents <secrets/home-assistant/mqtt-user>;
password = lib.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 #" ];
};
2020-06-01 04:12:15 +02:00
lightcontrol = {
password = "password";
2020-05-21 01:37:01 +02:00
acl = [ "topic readwrite #" ];
};
2020-04-08 16:43:09 +02:00
};
};
}