ma ham/zigbee2mqtt: giving up

docker-container that shit away
This commit is contained in:
makefu 2020-03-03 21:17:43 +01:00
parent 2563c59e73
commit e1d6406fbd
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -1,31 +1,20 @@
{config, pkgs, lib, ...}: {config, pkgs, lib, ...}:
let
pkg = pkgs.callPackage ./zigbee2mqtt.nix { };
in
{ {
#users.users.z2m = { # symlink the zigbee controller
# extraGroups = [ "dialout" ];
#};
services.udev.extraRules = '' services.udev.extraRules = ''
SUBSYSTEM=="tty", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="16a8", SYMLINK+="cc2531", MODE="0660", GROUP="dailout" SUBSYSTEM=="tty", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="16a8", SYMLINK+="cc2531", MODE="0660", GROUP="dailout"
''; '';
#systemd.services.zigbee2mqtt = {
# wantedBy = ["multi-user.target" ]; system.activationScripts.installZigbee = ''
# after = [ "network.target" ]; install -d /var/lib/zigbee2mqtt
# description = "Run zigbee2mqtt as daemon"; '';
# environment.ZIGBEE2MQTT_DATA = "/var/lib/zigbee2mqtt";
# serviceConfig = { docker-containers.zigbee2mqtt = {
# WorkingDirectory = ''${pkg}/lib/node_modules/zigbee2mqtt''; image = "koenkk/zigbee2mqtt";
# ExecStart = ''${pkgs.nodejs-12_x}/bin/node index.js''; extraDockerOptions = [ "--device=/dev/cc2531:/dev/cc2531" ];
# StandardOutput = "inherit"; volumes = ["/var/lib/zigbee2mqtt:/app/data"];
# StandardError = "inherit"; };
# Restart = "always"; state = [ "/var/lib/zigbee2mqtt/configuration.yaml" "/var/lib/zigbee2mqtt/state.json" ];
# User = "z2m";
# StateDirectory = "zigbee2mqtt";
# #DeviceAllow = "/dev/cc2531 rw";
# };
#};
} }