2021-03-05 15:27:23 +01:00
|
|
|
{ config, ... }:
|
2021-12-01 17:56:53 +01:00
|
|
|
let
|
|
|
|
password = "ymfQkXcEqGuk62S";
|
|
|
|
in
|
2021-03-05 15:27:23 +01:00
|
|
|
{
|
|
|
|
services.mosquitto = {
|
|
|
|
enable = true;
|
2021-12-01 17:56:53 +01:00
|
|
|
listeners = [
|
|
|
|
{
|
|
|
|
users = {
|
|
|
|
wordclock = {
|
|
|
|
acl = [
|
|
|
|
"readwrite wordclock/color/+"
|
|
|
|
];
|
|
|
|
inherit password;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
settings = {
|
|
|
|
allow_anonymous = false;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2021-03-05 15:27:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 1883 ];
|
|
|
|
|
|
|
|
services.wordclock-dimmer = {
|
|
|
|
enable = true;
|
|
|
|
mqtt = {
|
|
|
|
user = "wordclock";
|
2021-12-01 17:56:53 +01:00
|
|
|
inherit password;
|
2021-03-05 15:27:23 +01:00
|
|
|
host = "localhost";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|