From 55fffaa8a0fd0a3f53daa3b9070614c6b68390e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Wed, 1 May 2024 20:45:59 +0200 Subject: [PATCH] Add mosquitto and zigbee2mqtt --- services/home-assistant/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/services/home-assistant/default.nix b/services/home-assistant/default.nix index 73c793f..8893431 100644 --- a/services/home-assistant/default.nix +++ b/services/home-assistant/default.nix @@ -1,5 +1,6 @@ { pkgs, ... }: { + # Enable the Home Assistant service services.home-assistant = { enable = true; configWritable = true; @@ -10,4 +11,22 @@ customComponents = with pkgs.home-assistant-custom-components; [ ]; }; + + # Enable the mosquitto MQTT broker + services.mosquitto = { + enable = true; + config = { + allow_anonymous = true; + persistence = true; + }; + }; + + # Enable the zigbee2mqtt service + services.zigbee2mqtt = { + enable = true; + settings = { + permit_join = true; + serial.port = "/dev/ttyUSB0"; + }; + }; }