launch!
This commit is contained in:
@@ -1,20 +1,57 @@
|
||||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
mangoConfigList = ["cpu_temp" "gpu_temp" "ram" "vram"];
|
||||
mangoConfigStr = builtins.concatStringsSep "," mangoConfigList;
|
||||
|
||||
gamescopeArgsList = [
|
||||
"--adaptive-sync"
|
||||
"--hdr-enabled"
|
||||
"--mangoapp"
|
||||
"--rt"
|
||||
"--steam"
|
||||
];
|
||||
gamescopeArgsStr = builtins.concatStringsSep " " gamescopeArgsList;
|
||||
|
||||
steamArgsList = [
|
||||
"-pipewire-dmabuf"
|
||||
"-tenfoot"
|
||||
];
|
||||
steamArgsStr = builtins.concatStringsSep " " steamArgsList;
|
||||
|
||||
myGamescopeSteamScript = pkgs.writeShellApplication {
|
||||
name = "start-gamescope-steam";
|
||||
runtimeInputs = [
|
||||
pkgs.gamescope
|
||||
pkgs.steam
|
||||
pkgs.mangohud
|
||||
];
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
set -xeuo pipefail
|
||||
|
||||
export MANGOHUD=1
|
||||
export MANGOHUD_CONFIG="${mangoConfigStr}"
|
||||
|
||||
exec ${pkgs.gamescope}/bin/gamescope ${gamescopeArgsStr} -- ${pkgs.steam}/bin/steam ${steamArgsStr}
|
||||
'';
|
||||
};
|
||||
in {
|
||||
programs = {
|
||||
gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
steam = {
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers enable = true;
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.xone.enable = true;
|
||||
environment = {
|
||||
loginShellInit = ''
|
||||
[[ "$(tty)" = "/dev/tty1" ]] && ~/.config/nixos/gs.sh
|
||||
'';
|
||||
};
|
||||
|
||||
environment.loginShellInit = ''
|
||||
[[ "$(tty)" = "/dev/tty1" ]] && ${myGamescopeSteamScript}/bin/start-gamescope-steam
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user