diff options
author | makefu <github@syntax-fehler.de> | 2018-09-17 21:52:41 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2018-09-17 21:52:41 +0200 |
commit | 20eebf0ca30f7fabf5cd818a81a9e60c487b0962 (patch) | |
tree | 0e7895a29f93965d4f9e21bfbf5a8a344b6c75e3 /makefu/2configs/deployment/homeautomation/mqtt.nix | |
parent | e576c3182a8d4bfc85ec0755d3eeae40603183d7 (diff) |
ma homeautomation: add mqtt
Diffstat (limited to 'makefu/2configs/deployment/homeautomation/mqtt.nix')
-rw-r--r-- | makefu/2configs/deployment/homeautomation/mqtt.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/makefu/2configs/deployment/homeautomation/mqtt.nix b/makefu/2configs/deployment/homeautomation/mqtt.nix new file mode 100644 index 000000000..1d6a6a3a3 --- /dev/null +++ b/makefu/2configs/deployment/homeautomation/mqtt.nix @@ -0,0 +1,16 @@ +{ pkgs, config, ... }: +{ + services.mosquitto = { + enable = true; + host = "0.0.0.0"; + allowAnonymous = false; + checkPasswords = true; + # see <host>/mosquitto + users.sensor = { + hashedPassword = "$6$2DXU7W1bvqXPqxkF$vtdz5KTd/T09hmoc9LjgEGFjvpwQbQth6vlVcr5hJNLgcBHv4U03YCKC8TKXbmQAa8xiJ76xJIg25kcL+KI3tg=="; + acl = [ "topic readwrite #" ]; + }; + }; + environment.systemPackages = [ pkgs.mosquitto ]; + networking.firewall.allowedTCPPorts = [ config.services.mosquitto.port ]; +} |