From 995c115c905101a74dae25cc2100ff495f43c780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Fri, 10 May 2024 23:27:45 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=AE=20DualShock=204=20(or=20is=20it=3F?= =?UTF-8?q?)=20love?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ddcci removed again because it still doesn't do anything and also doesn't compile with latest kernel. --- hm/gaming/default.nix | 8 +++++++ os/desktop.nix | 3 --- os/gaming/default.nix | 22 +++++++++++++++++++ .../roles/system/files/xorg/joystick.conf | 15 ------------- .../automatrop/roles/system/tasks/main.yml | 9 -------- 5 files changed, 30 insertions(+), 27 deletions(-) delete mode 100644 unprocessed/config/automatrop/roles/system/files/xorg/joystick.conf delete mode 100644 unprocessed/config/automatrop/roles/system/tasks/main.yml diff --git a/hm/gaming/default.nix b/hm/gaming/default.nix index 67b2c6c..125fe1d 100644 --- a/hm/gaming/default.nix +++ b/hm/gaming/default.nix @@ -13,6 +13,14 @@ steam # Common pitfall: https://github.com/NixOS/nixpkgs/issues/86506#issuecomment-623746883 itch + (pkgs.python3Packages.ds4drv.overrideAttrs (old: { + src = fetchFromGitHub { + owner = "TheDrHax"; + repo = "ds4drv-cemuhook"; + rev = "a58f63b70f8d8efa33e5e82a8888a1e08754aeed"; + sha256 = "sha256-oMvHw5zeO0skoiqLU+EdjUabTvkipeBh+m8RHJcWZP8="; + }; + })) ]; sessionVariables = { BOOT9_PATH = "${config.xdg.dataHome}/citra-emu/sysdata/boot9.bin"; diff --git a/os/desktop.nix b/os/desktop.nix index 8011a2d..891ff9c 100644 --- a/os/desktop.nix +++ b/os/desktop.nix @@ -1,9 +1,6 @@ { pkgs, lib, config, ... }: { config = lib.mkIf config.frogeye.desktop.xorg { - # Control external screen brightness - boot.extraModulePackages = with config.boot.kernelPackages; [ ddcci-driver ]; - services = { blueman.enable = true; xserver = { diff --git a/os/gaming/default.nix b/os/gaming/default.nix index 9801491..006e398 100644 --- a/os/gaming/default.nix +++ b/os/gaming/default.nix @@ -2,7 +2,29 @@ { 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; 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 + ''; + }; }; } diff --git a/unprocessed/config/automatrop/roles/system/files/xorg/joystick.conf b/unprocessed/config/automatrop/roles/system/files/xorg/joystick.conf deleted file mode 100644 index 91713da..0000000 --- a/unprocessed/config/automatrop/roles/system/files/xorg/joystick.conf +++ /dev/null @@ -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 diff --git a/unprocessed/config/automatrop/roles/system/tasks/main.yml b/unprocessed/config/automatrop/roles/system/tasks/main.yml deleted file mode 100644 index 03ec156..0000000 --- a/unprocessed/config/automatrop/roles/system/tasks/main.yml +++ /dev/null @@ -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 }}"