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