nixos-config/machines/chungus/hass-zigbee2mqtt.nix
Ingolf Wagner 7a6510a4e6
nix fmt
2024-08-29 08:26:04 +07:00

54 lines
1 KiB
Nix

{
pkgs,
lib,
config,
...
}:
{
imports = [ ./hass-mqtt.nix ];
services.zigbee2mqtt = {
enable = true;
dataDir = "/srv2/zigbee2mqtt";
settings = {
# Home Assistant integration (MQTT discovery)
homeassistant = true;
# allow new devices to join
permit_join = false;
# MQTT settings
mqtt = {
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic = "zigbee2mqtt";
# MQTT server URL
server = "mqtt://127.0.0.1:1883";
};
# Serial settings
serial = {
#port = "/dev/ttyACM0";
port = "/dev/ttyUSB0";
# disable LED of CC2531 USB sniffer
disable_led = true;
};
advanced = {
log_output = [ "console" ];
log_level = "warn";
pan_id = 1337;
# add last seen information
last_seen = "ISO_8601_local";
};
# configure web ui
frontend.port = 9666;
frontend.host = "0.0.0.0";
experimental.new_api = true;
};
};
}