From b8d518e28d423c39e8a1391ce5dee8abbe0ef90b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Thu, 13 Jul 2023 19:36:21 +0100 Subject: [PATCH] add mqtt broker --- nixos/boxes/bolty/home-assistant.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/nixos/boxes/bolty/home-assistant.nix b/nixos/boxes/bolty/home-assistant.nix index f53fa413..dc46a828 100644 --- a/nixos/boxes/bolty/home-assistant.nix +++ b/nixos/boxes/bolty/home-assistant.nix @@ -7,7 +7,20 @@ let in { imports = [ ../nginx.nix ./virtualisation.nix ]; - networking.firewall.allowedTCPPorts = [ port ]; + networking.firewall.allowedTCPPorts = [ port 1883 ]; + services.mosquitto = { + enable = true; + listeners = [ + { + port = 1883; + omitPasswordAuth = true; + users = {}; + settings = { + allow_anonymous = true; + }; + acl = [ "topic readwrite #" ]; + }]; + }; services.nginx = { virtualHosts = {