diff --git a/ops/nixos/etheroute-lon01/default.nix b/ops/nixos/etheroute-lon01/default.nix index ac37c90fa7..c8ee245911 100644 --- a/ops/nixos/etheroute-lon01/default.nix +++ b/ops/nixos/etheroute-lon01/default.nix @@ -383,6 +383,10 @@ allow_websockets = true; timeout = "0"; }) + (service "totoro.int.as205479.net:8099" "zigbee2mqtt.int.lukegb.com" { + allow_websockets = true; + timeout = "0"; + }) ]; }; }; diff --git a/ops/nixos/totoro/home-assistant.nix b/ops/nixos/totoro/home-assistant.nix index 74d5eb7b08..bfef7766b3 100644 --- a/ops/nixos/totoro/home-assistant.nix +++ b/ops/nixos/totoro/home-assistant.nix @@ -1,8 +1,31 @@ -{ depot, lib, pkgs, ... }: +{ depot, lib, pkgs, config, ... }: let inherit (depot.ops) secrets; in { + services.zigbee2mqtt = { + enable = true; + settings = { + homeassistant = true; + serial.port = "/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_eca6e9ba6596ed11ac206b4ce259fb3e-if00-port0"; + mqtt.server = "mqtt://localhost:1883"; + frontend = { + port = 8099; + host = config.my.ip.tailscale6; + }; + }; + }; + services.mosquitto = { + enable = true; + listeners = [{ + address = "127.0.0.1"; + port = 1883; + } { + address = "::1"; + port = 1883; + }]; + }; + services.home-assistant = { enable = true; configWritable = true; @@ -34,6 +57,8 @@ in { broadlink = {}; homekit = {}; + mqtt = {}; + smartthings = {}; google_assistant = { project_id = "malden-homeassistant"; service_account = secrets.homeAssistant.googleServiceAccount;