{ pkgs, lib, config, private_assets, ... }: { imports = [ ./mqtt.nix ]; services.zigbee2mqtt = { enable = true; #package = pkgs.unstable.zigbee2mqtt.overrideAttrs (old: rec { # version = "1.18.1"; # src = pkgs.fetchFromGitHub { # owner = "Koenkk"; # repo = "zigbee2mqtt"; # rev = version; # sha256 = "1x73k346ayik5hv5axa3nvmd82mgwyrpxqv3dxnffi8aa1r8pf8x"; # }; #}); settings = { # Home Assistant integration (MQTT discovery) homeassistant = true; # allow new devices to join permit_join = true; # MQTT settings mqtt = { # MQTT base topic for zigbee2mqtt MQTT messages base_topic = "zigbee2mqtt"; # MQTT server URL server = "mqtt://127.0.0.1:1883"; # MQTT server authentication, uncomment if required: user = "zigbee"; password = lib.fileContents "${private_assets}/zigbee/home-assistant-password"; }; # Serial settings serial = { #port = "/dev/ttyACM0"; port = "/dev/ttyUSB0"; # disable LED of CC2531 USB sniffer #disable_led = true; }; # you own network key, # 16 numbers between 0 and 255 # see https://www.zigbee2mqtt.io/how_tos/how_to_secure_network.html advanced.network_key = import "${private_assets}/zigbee/networkKey.nix"; advanced.log_output = [ "console" ]; advanced.pan_id = 1337; # add last seen information advanced.last_seen = "ISO_8601_local"; # configure web ui frontend.port = 9666; frontend.host = "0.0.0.0"; experimental.new_api = true; }; }; }