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

33 lines
677 B
Nix

{ lib, ... }: {
# 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 #" ];
# };
# #lightcontrol = {
# # password = "password";
# # acl = [ "topic readwrite #" ];
# #};
# };
# };
services.mosquitto = {
enable = true;
listeners = [ {
acl = [ "pattern readwrite #" ];
omitPasswordAuth = true;
settings.allow_anonymous = true;
} ];
};
}