add mqtt host

This commit is contained in:
XenGi 2026-08-20 21:56:36 +02:00
commit b16ceb22ee
Signed by: xengi
SSH key fingerprint: SHA256:dM+fLZGsDvyv6kunjE8bGduL24VsCFB4LEOSdmRHdG0
3 changed files with 85 additions and 0 deletions

36
hosts/mqtt/mosquitto.nix Normal file
View file

@ -0,0 +1,36 @@
{ ... }:
{
services.mosquitto = {
enable = true;
listeners = [
{
port = 1883;
settings = {
ptotocol = "mqtt";
};
}
{
port = 8083;
settings = {
protocol = "websockets";
};
}
];
settings = {
allow_zero_length_clientid = true;
autosave_interval = 1800;
autosave_on_changes = true;
connection_messages = true;
allow_anonymous = true;
};
logDest = "stdout";
logType = [
"error"
"warning"
"notice"
"information"
];
};
}