From 89352f1448c39896aaf918f74ec81be5bc29b65f Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 5 Dec 2020 22:19:40 +0100 Subject: [PATCH] zigbee2mqtt fixing and upgrading --- configs/pepe/home-assistant/zigbee2mqtt.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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"; + }; + }