nixos-config/machines/fuuko/services/wordclock-dimmer.nix
Simon Bruder 6f31ded457
fuuko/wordclock: Use 15 character long password
```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.
2021-05-28 23:08:20 +02:00

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";
};
};
}