diff --git a/container/weewx/default.nix b/container/weewx/default.nix index d6f35c7..55e1b6a 100644 --- a/container/weewx/default.nix +++ b/container/weewx/default.nix @@ -36,22 +36,38 @@ in gid = 421; }; - services.mosquitto.listeners = [{ - address = "0.0.0.0"; - port = 1883; + services.mosquitto.listeners = [ + { + address = "0.0.0.0"; + port = 1883; - users = { - weewx-proxy = { - hashedPasswordFile = config.age.secrets.mosquitto-password-weewx-proxy.path; - acl = [ "write weewx/+" ]; + settings = { + protocol = "mqtt"; }; - weewx = { - hashedPasswordFile = config.age.secrets.mosquitto-password-weewx.path; - acl = [ "read weewx/+" ]; + users = { + weewx-proxy = { + hashedPasswordFile = config.age.secrets.mosquitto-password-weewx-proxy.path; + acl = [ "write weewx/+" ]; + }; + + weewx = { + hashedPasswordFile = config.age.secrets.mosquitto-password-weewx.path; + acl = [ "read weewx/+" "write weather/+" ]; + }; }; - }; - }]; + } + { + address = "127.0.0.1"; + port = 9883; + + settings = { + protocol = "websockets"; + }; + + acl = [ "topic read weather/+" ]; + } + ]; networking.firewall.interfaces = diff --git a/secret/container/weewx/config/weewx.conf b/secret/container/weewx/config/weewx.conf index cf3bf24..e1a3466 100644 Binary files a/secret/container/weewx/config/weewx.conf and b/secret/container/weewx/config/weewx.conf differ