diff --git a/nixos/machines/foxhut/machine.nix b/nixos/machines/foxhut/machine.nix index c542f3d7..ca5667c4 100644 --- a/nixos/machines/foxhut/machine.nix +++ b/nixos/machines/foxhut/machine.nix @@ -108,4 +108,43 @@ in { services.avahi.enable = true; virtualisation.docker.enable = true; + + services.udev.extraRules = '' + KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev" + KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" + + # Legacy rules for live training over webusb (Not needed for firmware v21+) + # Rule for all ZSA keyboards + SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev" + # Rule for the Moonlander + SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev" + # Rule for the Ergodox EZ + SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev" + # Rule for the Planck EZ + SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev" + + # Wally Flashing rules for the Ergodox EZ + ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" + ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" + SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" + KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" + + # Keymapp / Wally Flashing rules for the Moonlander and Planck EZ + SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu" + # Keymapp Flashing rules for the Voyager + SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" + ''; + + networking.extraHosts = + '' + 127.0.0.1 rds-gw.studat.chalmers.se + ''; + systemd.services.rdp-proxy = { + enable = true; + serviceConfig = { + ExecStart = "${pkgs.sshpass}/bin/sshpass -f /home/xenia/wireguard-keys/cid.pw ${pkgs.openssh}/bin/ssh -o StrictHostKeychecking=no -vNL 443:rds-gw.studat.chalmers.se:443 loovj@remote11.chalmers.se"; + Type = "simple"; + User = "root"; # to bind on :443 + }; + }; }