zigbee2mqtt fixing and upgrading

This commit is contained in:
Ingolf Wagner 2020-12-05 22:19:40 +01:00
parent e591ed6682
commit 89352f1448
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -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 <nixpkgs-unstable> { };
in {
imports = [ imports = [
./mqtt.nix ./mqtt.nix
./zigbee2mqtt/buttons.nix ./zigbee2mqtt/buttons.nix
@ -15,6 +20,8 @@
services.zigbee2mqtt = { services.zigbee2mqtt = {
enable = true; enable = true;
#package = pkgs.own_zigbee2mqtt;
package = unstable.zigbee2mqtt;
config = { config = {
# Home Assistant integration (MQTT discovery) # Home Assistant integration (MQTT discovery)
@ -45,8 +52,13 @@
# 16 numbers between 0 and 255 # 16 numbers between 0 and 255
# see https://www.zigbee2mqtt.io/how_tos/how_to_secure_network.html # see https://www.zigbee2mqtt.io/how_tos/how_to_secure_network.html
advanced.network_key = import <secrets/home-assistant/zigbee/networkKey>; advanced.network_key = import <secrets/home-assistant/zigbee/networkKey>;
advanced.log_output = [ "console" ];
}; };
}; };
systemd.services.zigbee2mqtt.environment = {
ZIGBEE2MQTT_DATA = "/var/lib/zigbee2mqtt";
};
} }