1
0
Fork 0

Compare commits

...

2 commits

Author SHA1 Message Date
Aires 3f8c3d8326 flake.lock: Update
Flake lock file updates:

• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/2e78b1af8025108ecd6edaa3ab09695b8a4d3d55' (2024-11-05)
  → 'github:NixOS/nixos-hardware/e1cc1f6483393634aee94514186d21a4871e78d7' (2024-11-06)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/d063c1dd113c91ab27959ba540c0d9753409edf3' (2024-11-04)
  → 'github:nixos/nixpkgs/dba414932936fde69f0606b4f1d87c5bc0003ede' (2024-11-06)
• Updated input 'nixpkgs-unstable':
    'github:nixos/nixpkgs/7ffd9ae656aec493492b44d0ddfb28e79a1ea25d' (2024-11-02)
  → 'github:nixos/nixpkgs/4aa36568d413aca0ea84a1684d2d46f55dbabad7' (2024-11-05)
2024-11-07 16:58:26 -05:00
Aires 4490bfccfc Shura: switch back to regular kernel; Apps: remove gaming udev rule for PDP Victrix controller 2024-11-07 16:58:24 -05:00
3 changed files with 10 additions and 42 deletions

View file

@ -267,11 +267,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1730828750, "lastModified": 1730919458,
"narHash": "sha256-XrnZLkLiBYNlwV5gus/8DT7nncF1TS5la6Be7rdVOpI=", "narHash": "sha256-yMO0T0QJlmT/x4HEyvrCyigGrdYfIXX3e5gWqB64wLg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "2e78b1af8025108ecd6edaa3ab09695b8a4d3d55", "rev": "e1cc1f6483393634aee94514186d21a4871e78d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -315,11 +315,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1730531603, "lastModified": 1730785428,
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -331,11 +331,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1730741070, "lastModified": 1730883749,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", "narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", "rev": "dba414932936fde69f0606b4f1d87c5bc0003ede",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -9,8 +9,7 @@ in
# Configure the kernel. # Configure the kernel.
boot = { boot = {
# First, install the latest Zen kernel kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_zen;
# Hardware defaults detected by nixos-generate-configuration # Hardware defaults detected by nixos-generate-configuration
initrd = { initrd = {

View file

@ -13,13 +13,6 @@ let
sudo rmmod hid_xpadneo && sudo modprobe hid_xpadneo sudo rmmod hid_xpadneo && sudo modprobe hid_xpadneo
sudo systemctl restart bluetooth.service 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 in
{ {
options = { options = {
@ -39,30 +32,6 @@ in
# Enable Xbox controller driver (XPadNeo) # Enable Xbox controller driver (XPadNeo)
hardware.xpadneo.enable = true; 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 # Add script to restart xpadneo in case of issues
aux.system.packages = [ reset-controllers-script ]; aux.system.packages = [ reset-controllers-script ];