blob: 1d6a6a3a33edd31b21a072b2eb5f3fa26793c28d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{ pkgs, config, ... }:
{
services.mosquitto = {
enable = true;
host = "0.0.0.0";
allowAnonymous = false;
checkPasswords = true;
# see <host>/mosquitto
users.sensor = {
hashedPassword = "$6$2DXU7W1bvqXPqxkF$vtdz5KTd/T09hmoc9LjgEGFjvpwQbQth6vlVcr5hJNLgcBHv4U03YCKC8TKXbmQAa8xiJ76xJIg25kcL+KI3tg==";
acl = [ "topic readwrite #" ];
};
};
environment.systemPackages = [ pkgs.mosquitto ];
networking.firewall.allowedTCPPorts = [ config.services.mosquitto.port ];
}
|