From 3c865cca8b2d3fdcf15fe7bf829db171dd0bfe88 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 10 Sep 2020 11:13:32 +0800 Subject: [PATCH] nixops: set up uhubctl for power cycling shitty embedded devices --- nixops/desktop.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixops/desktop.nix b/nixops/desktop.nix index a531cad..38378eb 100644 --- a/nixops/desktop.nix +++ b/nixops/desktop.nix @@ -26,7 +26,7 @@ in environment.systemPackages = with pkgs; [ opensc yubikey-manager yubikey-manager-qt wget vim gitAndTools.gitFull firefox chromium thunderbird hexchat - usbutils pciutils file lm_sensors audacious acpi + usbutils pciutils uhubctl file lm_sensors audacious acpi gimp imagemagick (python3.withPackages(ps: with ps; [ numpy scipy matplotlib qtconsole regex ])) mosh psmisc libreoffice-fresh @@ -148,6 +148,9 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="2457", ATTRS{idProduct}=="1002", MODE="0660" SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0116", MODE="0660", GROUP="plugdev" # dfu/booster SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0660", GROUP="plugdev" +# Renkforce USB hub with power control +SUBSYSTEM=="usb", ATTRS{idVendor}=="2109", ATTRS{idProduct}=="0812", MODE="0660", GROUP="plugdev" +SUBSYSTEM=="usb", ATTRS{idVendor}=="2109", ATTRS{idProduct}=="2812", MODE="0660", GROUP="plugdev" ''; nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];