mqtt: migrate to new configuration format

This commit is contained in:
makefu 2021-12-04 19:08:15 +01:00
parent 1ce8bf7c80
commit ecaaa1faae
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
2 changed files with 27 additions and 15 deletions

View File

@ -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;
settings.max_keepalive = 60;
listeners = [
{
port = 1883;
omitPasswordAuth = true;
users = {}; users = {};
# TODO: secure that shit settings = {
aclExtraConf = '' allow_anonymous = true;
pattern readwrite # };
''; acl = [ "topic readwrite #" "pattern readwrite #" ];
allowAnonymous = true; }
];
}; };
} }

View File

@ -2,12 +2,18 @@
{ {
services.mosquitto = { services.mosquitto = {
enable = true; enable = true;
host = "0.0.0.0"; persistence = false;
settings.max_keepalive = 60;
listeners = [
{
port = 1883;
omitPasswordAuth = true;
users = {}; users = {};
# TODO: secure that shit settings = {
aclExtraConf = '' allow_anonymous = true;
pattern readwrite # };
''; acl = [ "topic readwrite #" "pattern readwrite #" ];
allowAnonymous = true; }
];
}; };
} }