Simon Bruder
10b8d432d5
This applies the REUSE specification to the repository, so the licensing information can be tracked for every file individually.
40 lines
730 B
Nix
40 lines
730 B
Nix
# SPDX-FileCopyrightText: 2021-2023 Simon Bruder <simon@sbruder.de>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
{ config, ... }:
|
|
let
|
|
password = "ymfQkXcEqGuk62S";
|
|
in
|
|
{
|
|
services.mosquitto = {
|
|
enable = true;
|
|
listeners = [
|
|
{
|
|
users = {
|
|
wordclock = {
|
|
acl = [
|
|
"readwrite wordclock/color/+"
|
|
];
|
|
inherit password;
|
|
};
|
|
};
|
|
settings = {
|
|
allow_anonymous = false;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
networking.firewall.interfaces.br-iot.allowedTCPPorts = [ 1883 ];
|
|
|
|
services.wordclock-dimmer = {
|
|
enable = true;
|
|
mqtt = {
|
|
user = "wordclock";
|
|
inherit password;
|
|
host = "localhost";
|
|
};
|
|
};
|
|
}
|