2024-01-06 01:19:35 +01:00
|
|
|
# SPDX-FileCopyrightText: 2021-2023 Simon Bruder <simon@sbruder.de>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2023-12-31 16:36:16 +01:00
|
|
|
networking.firewall.interfaces.br-iot.allowedTCPPorts = [ 1883 ];
|
2021-03-05 15:27:23 +01:00
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|