fix(rpi4): fix home-assistant mqtt connection

- use mqtt websockets via separate port
This commit is contained in:
Felix Schröter 2020-10-22 22:08:16 +02:00
parent a70e42900d
commit f48e3c357e
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58

View file

@ -4,6 +4,7 @@ with pkgs;
let
mqttDomain = "mqtt.${config.networking.domain}";
mqttWSPort = "9001";
in
{
environment.systemPackages = with pkgs; [ deconz ];
@ -21,7 +22,7 @@ in
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString config.services.mosquitto.port}";
proxyPass = "http://localhost:${mqttWSPort}";
proxyWebsockets = true;
};
};
@ -37,6 +38,7 @@ in
host = "0.0.0.0";
checkPasswords = true;
extraConf = ''
listener ${mqttWSPort}
protocol websockets
'';
users = {