fix(rpi4): fix home-assistant mqtt connection
- use mqtt websockets via separate port
This commit is contained in:
parent
a70e42900d
commit
f48e3c357e
|
@ -4,6 +4,7 @@ with pkgs;
|
||||||
|
|
||||||
let
|
let
|
||||||
mqttDomain = "mqtt.${config.networking.domain}";
|
mqttDomain = "mqtt.${config.networking.domain}";
|
||||||
|
mqttWSPort = "9001";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [ deconz ];
|
environment.systemPackages = with pkgs; [ deconz ];
|
||||||
|
@ -21,7 +22,7 @@ in
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString config.services.mosquitto.port}";
|
proxyPass = "http://localhost:${mqttWSPort}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -37,6 +38,7 @@ in
|
||||||
host = "0.0.0.0";
|
host = "0.0.0.0";
|
||||||
checkPasswords = true;
|
checkPasswords = true;
|
||||||
extraConf = ''
|
extraConf = ''
|
||||||
|
listener ${mqttWSPort}
|
||||||
protocol websockets
|
protocol websockets
|
||||||
'';
|
'';
|
||||||
users = {
|
users = {
|
||||||
|
|
Loading…
Reference in a new issue