{ pkgs, perSystem, ... }: { programs = { gamescope.enable = true; gamescope.capSysNice = true; gamemode.enable = true; steam.enable = true; steam.package = perSystem.mypackages.steam-bwrapped.override { unfreePkgs = ["steam" "steam-unwrapped"]; addPkgs = let runtimeInputs = with pkgs; [mangohud gamemode gamescope]; in runtimeInputs ++ [ (pkgs.writeShellApplication { name = "mygamescope"; inherit runtimeInputs; text = '' export LD_PRELOAD="" export PROTON_ENABLE_WAYLAND=1 export DXVK_ALLOWFSE=true export DXVK_HUD=compiler gamemoderun \ gamescope -H 1440 -r 170 -f \ --adaptive-sync \ --rt \ --force-grab-cursor \ --mangoapp \ "$@" ''; }) ]; bwrapperOpts.mounts.readWrite = ["/storage/games/steam"]; }; }; }