stockholm/makefu/2configs/bureautomation/zigbee2mqtt/default.nix

32 lines
638 B
Nix
Raw Normal View History

2021-03-12 19:32:34 +00:00
{config, pkgs, lib, ...}:
let
dataDir = "/var/lib/zigbee2mqtt";
in
{
# symlink the zigbee controller
services.zigbee2mqtt = {
enable = true;
inherit dataDir;
2021-12-05 13:21:19 +00:00
settings = {
2021-03-12 19:32:34 +00:00
permit_join = true;
2023-02-27 12:37:35 +00:00
serial.port = "/dev/zigbee";
2021-03-12 19:32:34 +00:00
homeassistant = true;
frontend.port = 8521;
2021-03-12 19:32:34 +00:00
};
};
state = [ "${dataDir}/devices.yaml" "${dataDir}/state.json" ];
systemd.services.zigbee2mqtt = {
# override automatic configuration.yaml deployment
environment.ZIGBEE2MQTT_DATA = dataDir;
after = [
"home-assistant.service"
"mosquitto.service"
"network-online.target"
];
};
}