36 lines
596 B
Nix
36 lines
596 B
Nix
|
{ config, ... }:
|
||
|
let
|
||
|
password = "ymfQkXcEqGuk62S";
|
||
|
in
|
||
|
{
|
||
|
services.mosquitto = {
|
||
|
enable = true;
|
||
|
listeners = [
|
||
|
{
|
||
|
users = {
|
||
|
wordclock = {
|
||
|
acl = [
|
||
|
"readwrite wordclock/color/+"
|
||
|
];
|
||
|
inherit password;
|
||
|
};
|
||
|
};
|
||
|
settings = {
|
||
|
allow_anonymous = false;
|
||
|
};
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
|
||
|
networking.firewall.allowedTCPPorts = [ 1883 ];
|
||
|
|
||
|
services.wordclock-dimmer = {
|
||
|
enable = true;
|
||
|
mqtt = {
|
||
|
user = "wordclock";
|
||
|
inherit password;
|
||
|
host = "localhost";
|
||
|
};
|
||
|
};
|
||
|
}
|