mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
feat(gaming): declarative Proton and dGPU game rendering (#393)
This commit is contained in:
1 parent
90bbe8bc4f
commit
95b849420e
4 files changed
+33
-4
No files matched your search
@@ -38,6 +38,7 @@ A setting that works around a bug or a hardware quirk.
|
||||
| WA-011 | Kernel module blacklist (`esp4`, `esp6`, `rxrpc`) — `hardening/kernel-hardening.nix` | attack surface for the Dirty Frag LPE (CVE-2026-43284 / CVE-2026-43500) | Kept as defence in depth; drop only if something needs those modules | 2026-10-03 | rarely | active |
|
||||
| WA-017 | keyd right-hand modifier passthrough — `modules/nixos/desktop/peripherals.nix` | keyd folds right Ctrl/Shift/Meta into their left keys | Drop once keyd or fcitx5 keeps right-hand modifiers distinct | 2026-10-05 | on keyd bump | active |
|
||||
| WA-018 | user-owned `~/.ssh/config` + disabled systemd ssh-proxy include — `home/base/tui/ssh.nix`, `modules/nixos/base/ssh.nix` | bwrap exposes root-owned store files as `nobody` | Drop once sandboxes preserve store ownership | 2026-10-06 | when sandbox layout changes | active |
|
||||
| WA-019 | programs.steam.extraCompatPackages = [ pkgs-x64.dwproton-bin pkgs-x64.proton-ge-bin ] — modules/nixos/desktop/gaming.nix | ACE games fail on GE/mainline Proton, work with DW-Proton | Drop once mainline or GE-Proton runs these games (GE-Proton#433) | 2026-10-07 | on Proton/GE bump | active |
|
||||
|
||||
If WA-008 freezes recur, the fallback is to restore
|
||||
`nvme_core.default_ps_max_latency_us=0 nvme_core.io_timeout=4294967295 pcie_aspm=off`; this is a
|
||||
|
||||
@@ -22,6 +22,17 @@
|
||||
nvidiaBusId = "PCI:2@0:0:0";
|
||||
};
|
||||
|
||||
# Games launched through GameScope should use the dGPU. prime.offload keeps the
|
||||
# Intel iGPU as the default renderer so the dGPU stays free for LLM workloads,
|
||||
# so opt GameScope games into PRIME render offload here. Games launched outside
|
||||
# GameScope need `nvidia-offload %command%` in their Steam launch options.
|
||||
programs.gamescope.env = {
|
||||
__NV_PRIME_RENDER_OFFLOAD = "1";
|
||||
__NV_PRIME_RENDER_OFFLOAD_PROVIDER = "NVIDIA-G0";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
__VK_LAYER_NV_optimus = "NVIDIA_only";
|
||||
};
|
||||
|
||||
boot.kernelParams = [
|
||||
# Since NVIDIA does not load kernel mode setting by default,
|
||||
# enabling it is required to make Wayland compositors function properly.
|
||||
|
||||
@@ -265,6 +265,7 @@ in
|
||||
|
||||
"Games"
|
||||
".steam"
|
||||
".config/MangoHud"
|
||||
".config/blender"
|
||||
|
||||
".local/share/umu"
|
||||
|
||||
@@ -40,10 +40,6 @@ in
|
||||
# ~/.steam - Some Symlinks & user info
|
||||
enable = true;
|
||||
package = pkgs-x64.steam;
|
||||
# https://github.com/ValveSoftware/gamescope
|
||||
# Run a GameScope driven Steam session from your display-manager
|
||||
# fix resolution upscaling and stretched aspect ratios
|
||||
gamescopeSession.enable = true;
|
||||
# https://github.com/Winetricks/winetricks
|
||||
# Whether to enable protontricks, a simple wrapper for running Winetricks commands for Proton-enabled games.
|
||||
protontricks.enable = true;
|
||||
@@ -52,6 +48,26 @@ in
|
||||
fontPackages = [
|
||||
pkgs.wqy_zenhei # Need by steam for Chinese
|
||||
];
|
||||
# DW-Proton (Dawn Winery's Proton fork) carries the anti-cheat and game
|
||||
# patches that mainline Proton/GE-Proton lack, so it is what runs the anime
|
||||
# gacha games (Wuthering Waves, Honkai: Star Rail, Arknights: Endfield, ...);
|
||||
# GE-Proton is the general fallback. Both appear as compatibility tools in
|
||||
# each game's Properties -> Compatibility.
|
||||
# https://dawn.wine/dawn-winery/dwproton
|
||||
extraCompatPackages = [
|
||||
pkgs-x64.dwproton-bin
|
||||
pkgs-x64.proton-ge-bin
|
||||
];
|
||||
};
|
||||
|
||||
# GameScope: run a game in its own nested compositor and let it renice
|
||||
# itself for steadier frame pacing. GPU-specific PRIME render offload belongs
|
||||
# to the host, not here (see programs.gamescope.env in
|
||||
# hosts/idols-ai/hardware-nvidia.nix).
|
||||
# https://github.com/ValveSoftware/gamescope
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
|
||||
# see https://github.com/fufexan/nix-gaming/#pipewire-low-latency
|
||||
|
||||
Reference in new issue
Block a user