Stabilize sunshine
This commit is contained in:
parent
f7f1da25ed
commit
60eccadaa8
@ -39,11 +39,6 @@ in
|
||||
|
||||
hardware = {
|
||||
pulseaudio.enable = true;
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
@ -54,7 +49,10 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam.enable = true;
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
|
||||
security = {
|
||||
polkit.extraConfig = ''
|
||||
@ -71,6 +69,12 @@ in
|
||||
rtkit.enable = true;
|
||||
};
|
||||
|
||||
systemd.user.services.sunshine = {
|
||||
serviceConfig = {
|
||||
Restart = pkgs.lib.mkForce "always";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
sunshine = {
|
||||
enable = true;
|
||||
@ -98,14 +102,13 @@ in
|
||||
apps = [
|
||||
{
|
||||
name = "Steam";
|
||||
detached = [ "${pkgs.steam}/bin/steam" ];
|
||||
cmd = ''${pkgs.bash}/bin/bash -c "${pkgs.gamescope}/bin/gamescope -f --hdr-enabled -e -W ''${SUNSHINE_CLIENT_WIDTH} -H ''${SUNSHINE_CLIENT_HEIGHT} -r ''${SUNSHINE_CLIENT_FPS} -- ${pkgs.steam}/bin/steam"'';
|
||||
prep-cmd = [
|
||||
{
|
||||
do = "${resolutionScript}/bin/resolution.sh $SUNSHINE_CLIENT_WIDTH $SUNSHINE_CLIENT_HEIGHT $SUNSHINE_CLIENT_FPS";
|
||||
undo = "${pkgs.procps}/bin/pkill -KILL steam";
|
||||
do = ''${pkgs.bash}/bin/bash -c "${resolutionScript}/bin/resolution.sh ''${SUNSHINE_CLIENT_WIDTH} ''${SUNSHINE_CLIENT_HEIGHT}" ''${SUNSHINE_CLIENT_FPS}"'';
|
||||
undo = ''${pkgs.bash}/bin/bash -c "${pkgs.procps}/bin/pkill gamescope; ${pkgs.procps}/bin/pkill sunshine"'';
|
||||
}
|
||||
];
|
||||
auto-detach = "true";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user