feat(Zephyrus): Added new steam
user for steam specialization
This commit is contained in:
parent
447782e60f
commit
10b8d4d327
2 changed files with 30 additions and 3 deletions
27
bin/gs.sh
Executable file
27
bin/gs.sh
Executable 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[@]}"
|
|
@ -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}")}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue