feat(Zephyrus): Added new steam user for steam specialization

This commit is contained in:
GaspardCulis 2024-10-27 10:24:45 +01:00
parent 447782e60f
commit 10b8d4d327
2 changed files with 30 additions and 3 deletions

27
bin/gs.sh Executable 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[@]}"

View file

@ -75,6 +75,7 @@
"seat"
"audio"
"adbusers"
"gamemode"
"networkmanager"
];
group = "gaspard";
@ -94,8 +95,8 @@
};
users.users.steam = {
isNormalUser = true;
createHome = true;
extraGroups = [
"wheel"
"video"
"seat"
"audio"
@ -104,7 +105,6 @@
];
group = "steam";
};
programs = {
gamescope = {
enable = true;
@ -122,7 +122,7 @@
services.getty.autologinUser = "steam";
environment = {
loginShellInit = ''
[[ "$(tty)" = "/dev/tty1" ]] && ./gs.sh
[[ "$(tty)" = "/dev/tty1" ]] && ${(pkgs.writeShellScript "gs.sh" "${builtins.readFile ../../bin/gs.sh}")}
'';
};
};