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 = {
|
programs = {
|
||||||
gamescope = {
|
gamescope = {
|
||||||
enable = true;
|
enable = true;
|
||||||
capSysNice = true;
|
capSysNice = true;
|
||||||
};
|
};
|
||||||
steam = {
|
steam = {
|
||||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
enable = true;
|
||||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
remotePlay.openFirewall = true;
|
||||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers enable = true;
|
dedicatedServer.openFirewall = true;
|
||||||
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
gamescopeSession.enable = true;
|
gamescopeSession.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.xone.enable = true;
|
hardware.xone.enable = true;
|
||||||
environment = {
|
|
||||||
loginShellInit = ''
|
environment.loginShellInit = ''
|
||||||
[[ "$(tty)" = "/dev/tty1" ]] && ~/.config/nixos/gs.sh
|
[[ "$(tty)" = "/dev/tty1" ]] && ${myGamescopeSteamScript}/bin/start-gamescope-steam
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user