From 4490bfccfc894c1128040864155ce0a999d2fd6f Mon Sep 17 00:00:00 2001 From: Andre Date: Thu, 7 Nov 2024 16:50:00 -0500 Subject: [PATCH] Shura: switch back to regular kernel; Apps: remove gaming udev rule for PDP Victrix controller --- hosts/Shura/hardware-configuration.nix | 3 +-- modules/apps/gaming.nix | 31 -------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/hosts/Shura/hardware-configuration.nix b/hosts/Shura/hardware-configuration.nix index f97d1bc..bee6ac9 100644 --- a/hosts/Shura/hardware-configuration.nix +++ b/hosts/Shura/hardware-configuration.nix @@ -9,8 +9,7 @@ in # Configure the kernel. boot = { - # First, install the latest Zen kernel - kernelPackages = pkgs.linuxPackages_zen; + kernelPackages = pkgs.linuxPackages_latest; # Hardware defaults detected by nixos-generate-configuration initrd = { diff --git a/modules/apps/gaming.nix b/modules/apps/gaming.nix index 5250c3a..838bc40 100644 --- a/modules/apps/gaming.nix +++ b/modules/apps/gaming.nix @@ -13,13 +13,6 @@ let sudo rmmod hid_xpadneo && sudo modprobe hid_xpadneo sudo systemctl restart bluetooth.service ''; - - # vendorID and product ID for Victrix Pro BFG controller - vendorID = "0e6f"; - productID = "024b"; - - # Bluetooth config for Victrix PDP pro - vitrix-pdp-pro-bluetooth = pkgs.writeText "info" (builtins.readFile ./bluetooth/vitrix-pdp-pro); in { options = { @@ -39,30 +32,6 @@ in # Enable Xbox controller driver (XPadNeo) hardware.xpadneo.enable = true; - systemd.tmpfiles.rules = lib.mkIf config.aux.system.bluetooth.enable [ - "d /var/lib/bluetooth/${config.aux.system.bluetooth.adapter}/ 0700 root root" # First, make sure the directory exists - "L+ /var/lib/bluetooth/${config.aux.system.bluetooth.adapter}/00:34:30:47:37:AB/info - - - - ${vitrix-pdp-pro-bluetooth}" - ]; - - # Create udev rule to force PDP Victrix controller to use xpadneo - # Udev rule taken from https://github.com/atar-axis/xpadneo/blob/master/hid-xpadneo/etc-udev-rules.d/60-xpadneo.rules - # Also see https://www.reddit.com/r/linuxquestions/comments/rcx182/why_cant_i_write_to_sysbushiddriversxpadneonew_id/ - services.udev.extraRules = '' - ACTION=="add", ATTRS{id/vendor}==${vendorID}, ATTRS{id/product}==${productID}, RUN+="${pkgs.bash}/bin/bash -c 'echo 0x03 ${vendorID} ${productID} > /sys/bus/hid/drivers/xpadneo/new_id && echo 0x05 ${vendorID} ${productID} > /sys/bus/hid/drivers/xpadneo/new_id'" - ''; - /* - services.udev.packages = [ - (pkgs.writeTextFile { - name = "victrix-pro-bfg.rules"; - executable = true; - destination = "/etc/udev/rules.d/70-victrix-pro-bfg.rules"; - text = '' - ACTION=="add", ATTRS{id/vendor}==${vendorID}, ATTRS{id/product}==${productID}, RUN+="${pkgs.bash}/bin/bash -c 'echo 0x03 ${vendorID} ${productID} > /sys/bus/hid/drivers/xpadneo/new_id && echo 0x05 ${vendorID} ${productID} > /sys/bus/hid/drivers/xpadneo/new_id'" - ''; - }) - ]; - */ - # Add script to restart xpadneo in case of issues aux.system.packages = [ reset-controllers-script ];