Sunshine improvements

This commit is contained in:
Vili Sinervä 2025-01-11 18:41:00 +02:00
parent ffb8e65ab4
commit faabbf0262
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996

View file

@ -1,5 +1,9 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
let let
sunshineCuda = pkgs.sunshine.override {
cudaSupport = true;
stdenv = pkgs.cudaPackages.backendStdenv;
};
resolution_list = [ resolution_list = [
"1920x1080" "1920x1080"
"2400x1080" "2400x1080"
@ -17,6 +21,7 @@ in
]; ];
services.sunshine = { services.sunshine = {
package = sunshineCuda;
enable = true; enable = true;
autoStart = true; autoStart = true;
openFirewall = true; openFirewall = true;
@ -42,12 +47,12 @@ in
resolutions: resolutions:
map (resolution: { map (resolution: {
name = "${resolution} Desktop"; name = "${resolution} Desktop";
# prep-cmd = [ prep-cmd = [
# { {
# do = "${pkgs.xrandr}/bin/kscreen-doctor output.DP-4.mode.2560x1440@144"; do = "${pkgs.xrandr}/bin/xrandr --output HDMI-0 --mode ${resolution}";
# undo = "${pkgs.xrandr}/bin/kscreen-doctor output.DP-4.mode.3440x1440@144"; undo = "${pkgs.xrandr}/bin/xrandr --output HDMI-0 --auto";
# } }
# ]; ];
exclude-global-prep-cmd = "false"; exclude-global-prep-cmd = "false";
auto-detach = "true"; auto-detach = "true";
}) resolutions }) resolutions