From 2cf6bc110d97f2ea232da13e0b6c8210f25bcdb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Sat, 11 Jan 2025 17:47:07 +0200 Subject: [PATCH] WIP Sunshine conf --- services/sunshine.nix | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/services/sunshine.nix b/services/sunshine.nix index 1fd252f..7525fd3 100644 --- a/services/sunshine.nix +++ b/services/sunshine.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ pkgs, config, ... }: { assertions = [ { @@ -11,5 +11,39 @@ enable = true; autoStart = true; openFirewall = true; + settings = { + sunshine_name = "Gaming NixOS"; + resolutions = [ + [ + "1920x1080" + "2400x1080" + "2160x1440" + "2560x1440" + "3840x2160" + ] + ]; + fps = [ + 30 + 60 + 90 + 120 + ]; + address_family = "both"; + }; + applications = { + apps = + resolution: + map { + name = "${resolution} Desktop"; + # prep-cmd = [ + # { + # do = "${pkgs.xrandr}/bin/kscreen-doctor output.DP-4.mode.2560x1440@144"; + # undo = "${pkgs.xrandr}/bin/kscreen-doctor output.DP-4.mode.3440x1440@144"; + # } + # ]; + exclude-global-prep-cmd = "false"; + auto-detach = "true"; + } config.services.sunshine.settings.resolutions; + }; }; }