nixos-riscv/examples/mosquitto.nix
2022-07-13 07:45:04 +01:00

19 lines
357 B
Nix

{
networking.firewall.allowedTCPPorts = [ 1883 ];
services.mosquitto = {
enable = true;
settings.max_keepalive = 300;
listeners = [
{
port = 1883;
omitPasswordAuth = true;
users = {};
settings = {
allow_anonymous = true;
};
acl = [ "topic readwrite #" ];
}
];
};
}