From 843ee70248752c7b3fc656807bd12b6e6f21f0e1 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 24 Feb 2020 16:59:11 +0100 Subject: ma ham/zigbee2mqtt: configuration with discovery in mind --- makefu/2configs/ham/zigbee2mqtt/default.nix | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 makefu/2configs/ham/zigbee2mqtt/default.nix (limited to 'makefu/2configs/ham/zigbee2mqtt') diff --git a/makefu/2configs/ham/zigbee2mqtt/default.nix b/makefu/2configs/ham/zigbee2mqtt/default.nix new file mode 100644 index 000000000..cb1f80d8a --- /dev/null +++ b/makefu/2configs/ham/zigbee2mqtt/default.nix @@ -0,0 +1,31 @@ +{config, pkgs, lib, ...}: + +let + pkg = pkgs.callPackage ./zigbee2mqtt.nix { }; +in + +{ + #users.users.z2m = { + # extraGroups = [ "dialout" ]; + #}; + + services.udev.extraRules = '' + SUBSYSTEM=="tty", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="16a8", SYMLINK+="cc2531", MODE="0660", GROUP="dailout" + ''; + #systemd.services.zigbee2mqtt = { + # wantedBy = ["multi-user.target" ]; + # after = [ "network.target" ]; + # description = "Run zigbee2mqtt as daemon"; + # environment.ZIGBEE2MQTT_DATA = "/var/lib/zigbee2mqtt"; + # serviceConfig = { + # WorkingDirectory = ''${pkg}/lib/node_modules/zigbee2mqtt''; + # ExecStart = ''${pkgs.nodejs-12_x}/bin/node index.js''; + # StandardOutput = "inherit"; + # StandardError = "inherit"; + # Restart = "always"; + # User = "z2m"; + # StateDirectory = "zigbee2mqtt"; + # #DeviceAllow = "/dev/cc2531 rw"; + # }; + #}; +} -- cgit v1.2.3