diff --git a/modules/nixos/services/home-assistant/default.nix b/modules/nixos/services/home-assistant/default.nix index 27bb514..105f094 100644 --- a/modules/nixos/services/home-assistant/default.nix +++ b/modules/nixos/services/home-assistant/default.nix @@ -15,9 +15,31 @@ in options.${namespace}.services.home-assistant = { enable = mkEnableOption "Home Assistant, the ultimate home automation service."; subdomain = mkOpt types.str "home" "The subdomain the service should be exposed on."; + openthread-device = + mkOpt types.str "/dev/serial/by-id/usb-Nabu_Casa_ZBT-2_94A990D18A9C-if00" + "The path to your thread border router serial device."; + openthread-interface = mkOpt types.str "enp1s0" "The system network interface shorthand."; }; config = mkIf cfg.enable { + # Additional required service for thread border router support (e.g. ZBT-2) + services.openthread-border-router = { + enable = true; + + radio = { + device = cfg.openthread-device; + baudRate = 460800; + flowControl = true; + }; + + backboneInterfaces = [ cfg.openthread-interface ]; + + rest = { + listenAddress = "::1"; + listenPort = 8081; + }; + }; + services.home-assistant = { enable = true; @@ -27,6 +49,10 @@ in "google_translate" "met" "radio_browser" + + # For thread/matter with the ZBT-2 + "matter" + "otbr" "thread" # Recommended for fast zlib compression