WIP Sunshine conf

This commit is contained in:
Vili Sinervä 2025-01-11 17:56:58 +02:00
parent c2d097ccc6
commit b724e83c55
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996

View file

@ -1,6 +1,14 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
let let
generateApps = resolutions = [
"1920x1080"
"2400x1080"
"2160x1440"
"2560x1440"
"3840x2160"
];
apps =
(
resolutions: resolutions:
map (resolution: { map (resolution: {
name = "${resolution} Desktop"; name = "${resolution} Desktop";
@ -12,7 +20,9 @@ let
# ]; # ];
exclude-global-prep-cmd = "false"; exclude-global-prep-cmd = "false";
auto-detach = "true"; auto-detach = "true";
}) resolutions; }) resolutions
)
resolutions;
in in
{ {
assertions = [ assertions = [
@ -28,15 +38,7 @@ in
openFirewall = true; openFirewall = true;
settings = { settings = {
sunshine_name = "Gaming NixOS"; sunshine_name = "Gaming NixOS";
resolutions = [ resolutions = resolutions;
[
"1920x1080"
"2400x1080"
"2160x1440"
"2560x1440"
"3840x2160"
]
];
fps = [ fps = [
30 30
60 60
@ -46,7 +48,7 @@ in
address_family = "both"; address_family = "both";
}; };
applications = { applications = {
apps = generateApps config.services.sunshine.settings.resolutions; apps = apps;
}; };
}; };
} }