21 lines
355 B
Nix
21 lines
355 B
Nix
{ ... }:
|
|
let
|
|
port = 1883;
|
|
in
|
|
{
|
|
services.mosquitto = {
|
|
enable = true;
|
|
logType = [ "all" ];
|
|
listeners = [
|
|
{
|
|
address = "0.0.0.0";
|
|
acl = [ "topic readwrite #" ];
|
|
port = port;
|
|
settings = {
|
|
allow_anonymous = true;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
networking.firewall.allowedTCPPorts = [ port ];
|
|
}
|