2021-03-05 15:27:23 +01:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.mosquitto = {
|
|
|
|
enable = true;
|
|
|
|
host = "0.0.0.0";
|
|
|
|
users = {
|
|
|
|
wordclock = {
|
|
|
|
acl = [
|
|
|
|
"topic readwrite wordclock/color/+"
|
|
|
|
];
|
2021-05-28 23:02:11 +02:00
|
|
|
password = "ymfQkXcEqGuk62S";
|
2021-03-05 15:27:23 +01:00
|
|
|
};
|
|
|
|
};
|
2021-05-28 23:01:19 +02:00
|
|
|
checkPasswords = true;
|
2021-03-05 15:27:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 1883 ];
|
|
|
|
|
|
|
|
services.wordclock-dimmer = {
|
|
|
|
enable = true;
|
|
|
|
mqtt = {
|
|
|
|
user = "wordclock";
|
|
|
|
password = config.services.mosquitto.users.wordclock.password;
|
|
|
|
host = "localhost";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|