2024-06-10 15:38:48 +02:00
|
|
|
# Sources for this configuration:
|
|
|
|
# - https://search.nixos.org/options?sort=relevance&type=packages&query=services.mosquitto
|
|
|
|
# - https://mosquitto.org/man/mosquitto-conf-5.html
|
|
|
|
# - https://winkekatze24.de
|
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
2024-11-05 22:52:02 +01:00
|
|
|
services.mosquitto = {
|
|
|
|
enable = true;
|
|
|
|
persistence = true;
|
2024-06-10 15:38:48 +02:00
|
|
|
|
2024-11-05 22:52:02 +01:00
|
|
|
# set config for all listeners
|
|
|
|
listeners = [{
|
|
|
|
settings.allow_anonymous = true;
|
|
|
|
omitPasswordAuth = true;
|
|
|
|
acl = [ "topic readwrite #" ];
|
|
|
|
}];
|
2024-06-10 15:38:48 +02:00
|
|
|
|
2024-11-05 22:52:02 +01:00
|
|
|
bridges.winkekatz = {
|
|
|
|
addresses = [
|
|
|
|
{ address = "mqtt.winkekatze24.de"; }
|
|
|
|
];
|
|
|
|
topics = [
|
|
|
|
"winkekatze/allcats/eye/set in 2"
|
|
|
|
"winkekatze/allcats in 2"
|
|
|
|
"+/status out 2 winkekatze/ \"\""
|
|
|
|
"+/connected out 2 winkekatze/ \"\""
|
|
|
|
];
|
2024-06-10 15:38:48 +02:00
|
|
|
};
|
2024-11-05 22:52:02 +01:00
|
|
|
};
|
2024-06-10 15:38:48 +02:00
|
|
|
|
2024-11-05 22:52:02 +01:00
|
|
|
networking.firewall.allowedTCPPorts = [ 1883 ];
|
|
|
|
}
|