🎮 DualShock 4 (or is it?) love

ddcci removed again because it still doesn't do anything and also doesn't compile
with latest kernel.
This commit is contained in:
Geoffrey Frogeye 2024-05-10 23:27:45 +02:00
parent 7c6e8adbed
commit 995c115c90
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
5 changed files with 30 additions and 27 deletions

View file

@ -13,6 +13,14 @@
steam # Common pitfall: https://github.com/NixOS/nixpkgs/issues/86506#issuecomment-623746883 steam # Common pitfall: https://github.com/NixOS/nixpkgs/issues/86506#issuecomment-623746883
itch itch
(pkgs.python3Packages.ds4drv.overrideAttrs (old: {
src = fetchFromGitHub {
owner = "TheDrHax";
repo = "ds4drv-cemuhook";
rev = "a58f63b70f8d8efa33e5e82a8888a1e08754aeed";
sha256 = "sha256-oMvHw5zeO0skoiqLU+EdjUabTvkipeBh+m8RHJcWZP8=";
};
}))
]; ];
sessionVariables = { sessionVariables = {
BOOT9_PATH = "${config.xdg.dataHome}/citra-emu/sysdata/boot9.bin"; BOOT9_PATH = "${config.xdg.dataHome}/citra-emu/sysdata/boot9.bin";

View file

@ -1,9 +1,6 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
config = lib.mkIf config.frogeye.desktop.xorg { config = lib.mkIf config.frogeye.desktop.xorg {
# Control external screen brightness
boot.extraModulePackages = with config.boot.kernelPackages; [ ddcci-driver ];
services = { services = {
blueman.enable = true; blueman.enable = true;
xserver = { xserver = {

View file

@ -2,7 +2,29 @@
{ {
config = lib.mkIf config.frogeye.gaming config = lib.mkIf config.frogeye.gaming
{ {
boot.kernelPackages = pkgs.linuxPackages_latest; # 24.05 6.2 has fix for knock-off DS4 controllers. Should downgrade when I have the spoons.
programs.steam.enable = true; programs.steam.enable = true;
hardware.opengl.driSupport32Bit = true; # Enables support for 32bit libs that steam uses hardware.opengl.driSupport32Bit = true; # Enables support for 32bit libs that steam uses
services = {
udev.packages = [ pkgs.python3Packages.ds4drv ];
xserver.config = ''
# Disable mouse support for joypad
Section "InputClass"
Identifier "joystick catchall"
MatchIsJoystick "on"
MatchDevicePath "/dev/input/event*"
Driver "joystick"
Option "StartKeysEnabled" "False"
Option "StartMouseEnabled" "False"
EndSection
# Same thing for DualShock 4 touchpad
Section "InputClass"
Identifier "ds4-touchpad"
Driver "libinput"
MatchProduct "Wireless Controller Touchpad"
Option "Ignore" "True"
EndSection
'';
};
}; };
} }

View file

@ -1,15 +0,0 @@
Section "InputClass"
Identifier "joystick catchall"
MatchIsJoystick "on"
MatchDevicePath "/dev/input/event*"
Driver "joystick"
Option "StartKeysEnabled" "False" #Disable mouse
Option "StartMouseEnabled" "False" #support
EndSection
# Same thing for DualShock 4 touchpad
Section "InputClass"
Identifier "ds4-touchpad"
Driver "libinput"
MatchProduct "Wireless Controller Touchpad"
Option "Ignore" "True"
EndSection

View file

@ -1,9 +0,0 @@
# Xorg configuration
- name: Configure Xorg joystick behaviour
ansible.builtin.copy:
src: xorg/joystick.conf
dest: "{{ item }}/50-joystick.conf"
become: true
when: display_server == 'x11'
loop: "{{ xorg_common_config_dirs }}"