Simon Bruder
6f31ded457
```cpp
struct {
char domain[32];
char clientId[16];
char user[16];
char password[16];
} mqtt;
```
(f637c2f39e/PersistentStorage.h
)
This went unnoticed, because on NixOS, mosquitto does not validate
passwords by default.
29 lines
530 B
Nix
29 lines
530 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
services.mosquitto = {
|
|
enable = true;
|
|
host = "0.0.0.0";
|
|
users = {
|
|
wordclock = {
|
|
acl = [
|
|
"topic readwrite wordclock/color/+"
|
|
];
|
|
password = "ymfQkXcEqGuk62S";
|
|
};
|
|
};
|
|
checkPasswords = true;
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 1883 ];
|
|
|
|
services.wordclock-dimmer = {
|
|
enable = true;
|
|
mqtt = {
|
|
user = "wordclock";
|
|
password = config.services.mosquitto.users.wordclock.password;
|
|
host = "localhost";
|
|
};
|
|
};
|
|
}
|