mqtt: migrate to new configuration format
This commit is contained in:
parent
1ce8bf7c80
commit
ecaaa1faae
@ -1,15 +1,21 @@
|
|||||||
# hostname: mqtt.shack
|
{ ... }:
|
||||||
{
|
{
|
||||||
networking.firewall.allowedTCPPorts = [ 1883 ];
|
networking.firewall.allowedTCPPorts = [ 1883 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 1883 ];
|
networking.firewall.allowedUDPPorts = [ 1883 ];
|
||||||
services.mosquitto = {
|
services.mosquitto = {
|
||||||
enable = true;
|
enable = true;
|
||||||
host = "0.0.0.0";
|
persistence = false;
|
||||||
users = {};
|
settings.max_keepalive = 60;
|
||||||
# TODO: secure that shit
|
listeners = [
|
||||||
aclExtraConf = ''
|
{
|
||||||
pattern readwrite #
|
port = 1883;
|
||||||
'';
|
omitPasswordAuth = true;
|
||||||
allowAnonymous = true;
|
users = {};
|
||||||
|
settings = {
|
||||||
|
allow_anonymous = true;
|
||||||
|
};
|
||||||
|
acl = [ "topic readwrite #" "pattern readwrite #" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,18 @@
|
|||||||
{
|
{
|
||||||
services.mosquitto = {
|
services.mosquitto = {
|
||||||
enable = true;
|
enable = true;
|
||||||
host = "0.0.0.0";
|
persistence = false;
|
||||||
users = {};
|
settings.max_keepalive = 60;
|
||||||
# TODO: secure that shit
|
listeners = [
|
||||||
aclExtraConf = ''
|
{
|
||||||
pattern readwrite #
|
port = 1883;
|
||||||
'';
|
omitPasswordAuth = true;
|
||||||
allowAnonymous = true;
|
users = {};
|
||||||
|
settings = {
|
||||||
|
allow_anonymous = true;
|
||||||
|
};
|
||||||
|
acl = [ "topic readwrite #" "pattern readwrite #" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user