diff --git a/modules/homelab/services/smarthome/mosquitto/default.nix b/modules/homelab/services/smarthome/mosquitto/default.nix index 73194fe..28e19e8 100644 --- a/modules/homelab/services/smarthome/mosquitto/default.nix +++ b/modules/homelab/services/smarthome/mosquitto/default.nix @@ -55,17 +55,16 @@ in }; # enable the ${service} service - services.${service} = { - enable = true; - listeners = [ - { - acl = [ "pattern readwrite #" ]; # Allows read/write access to all topics - omitPasswordAuth = true; # Disables password authentication - allow_anonymous = true; # Allows anonymous connections - } - ]; - }; - + services.mosquitto.enable = true; + services.mosquitto.listeners = [ + { + port = 1883; + bindAddress = "0.0.0.0"; + allow_anonymous = true; + aclFile = null; # optional + passwordFile = null; # optional + } + ]; # override umask to make permissions work out systemd.services.${service}.serviceConfig = { UMask = lib.mkForce "0007";