diff --git a/configs/pepe/home-assistant/zigbee2mqtt.nix b/configs/pepe/home-assistant/zigbee2mqtt.nix index 299a803..444f536 100644 --- a/configs/pepe/home-assistant/zigbee2mqtt.nix +++ b/configs/pepe/home-assistant/zigbee2mqtt.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, config, ... }: { +{ pkgs, lib, config, ... }: +# no need to set ZIGBEE2MQTT_DATA anymore +assert lib.versionOlder lib.version "21.03"; + +let unstable = import { }; +in { imports = [ ./mqtt.nix ./zigbee2mqtt/buttons.nix @@ -15,6 +20,8 @@ services.zigbee2mqtt = { enable = true; + #package = pkgs.own_zigbee2mqtt; + package = unstable.zigbee2mqtt; config = { # Home Assistant integration (MQTT discovery) @@ -45,8 +52,13 @@ # 16 numbers between 0 and 255 # see https://www.zigbee2mqtt.io/how_tos/how_to_secure_network.html advanced.network_key = import ; + advanced.log_output = [ "console" ]; }; }; + systemd.services.zigbee2mqtt.environment = { + ZIGBEE2MQTT_DATA = "/var/lib/zigbee2mqtt"; + }; + }