From c6b8d087ac0e9803f40c8280d373ec5011f8addc Mon Sep 17 00:00:00 2001 From: chexit Date: Tue, 12 May 2026 15:55:58 +0300 Subject: [PATCH] feat: extract gaming config into dedicated gaming.nix module Moves steam, gamemode, DualSense udev rules, and gaming packages (lutris, winetricks, wine, dxvk, vkd3d-proton, mangohud, dualsensectl, protonup-qt, prismlauncher) into gaming.nix. Also adds bluetooth/blueman config to configuration.nix. Co-Authored-By: Claude Sonnet 4.6 --- configuration.nix | 16 ++++++++-------- gaming.nix | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 gaming.nix diff --git a/configuration.nix b/configuration.nix index 6cb4a03..cece97c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -8,7 +8,8 @@ ./niri.nix ./nvidia.nix ./shell.nix - ./yami-dev-stack.nix + ./yami-dev-stack.nix + ./gaming.nix ]; nix = { @@ -58,6 +59,12 @@ networkmanager.enable = true; }; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + services.blueman.enable = true; + time.timeZone = "Europe/Moscow"; i18n = { @@ -93,13 +100,6 @@ tunMode.enable = true; }; - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - }; - - programs.gamemode.enable = true; services.tailscale.enable = true; # Docker is now managed by yami-dev-stack.nix when that module is enabled. diff --git a/gaming.nix b/gaming.nix new file mode 100644 index 0000000..0e63217 --- /dev/null +++ b/gaming.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: + +{ + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + + programs.gamemode.enable = true; + + services.udev.extraRules = '' + # DualSense: тачпад не должен работать как мышь рабочего стола. + # Steam Input/SDL читают геймпад (включая тачпад) через hidraw, + # так что в играх он останется доступен как тачпад контроллера. + SUBSYSTEM=="input", ATTRS{name}=="Sony Interactive Entertainment DualSense Wireless Controller Touchpad", ENV{LIBINPUT_IGNORE_DEVICE}="1", ENV{ID_INPUT_MOUSE}="0", ENV{ID_INPUT_TOUCHPAD}="0" + SUBSYSTEM=="input", ATTRS{name}=="DualSense Wireless Controller Touchpad", ENV{LIBINPUT_IGNORE_DEVICE}="1", ENV{ID_INPUT_MOUSE}="0", ENV{ID_INPUT_TOUCHPAD}="0" + ''; + + environment.systemPackages = with pkgs; [ + dualsensectl + protonup-qt + prismlauncher + lutris + winetricks + wineWow64Packages.stagingFull + dxvk + vkd3d-proton + mangohud + gamemode + ]; +}