alien: add gamescope

This commit is contained in:
Sean Kovacs 2025-12-15 14:36:26 -05:00
commit 41597eefd5
Signed by: sckova
GPG key ID: 00F325187C68651A
2 changed files with 35 additions and 0 deletions

View file

@ -47,6 +47,14 @@
};
defaultSession = "niri";
};
environment = {
systemPackages = [ pkgs.mangohud ];
loginShellInit = ''
[[ "$(tty)" = "/dev/tty1" ]] && ./gs.sh
'';
};
security.sudo.wheelNeedsPassword = true;
hardware.nvidia = {

27
system/hosts/alien/gs.sh Normal file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -xeuo pipefail
gamescopeArgs=(
--adaptive-sync # VRR support
--hdr-enabled
--mangoapp # performance overlay
--rt
--steam
)
steamArgs=(
-pipewire-dmabuf
-tenfoot
)
mangoConfig=(
cpu_temp
gpu_temp
ram
vram
)
mangoVars=(
MANGOHUD=1
MANGOHUD_CONFIG="$(IFS=,; echo "${mangoConfig[*]}")"
)
export "${mangoVars[@]}"
exec gamescope "${gamescopeArgs[@]}" -- steam "${steamArgs[@]}"