2025-05-04 02:47:36 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2025-08-15 21:33:22 +02:00
|
|
|
cfg = config.mySystem.services.sunshine;
|
2025-05-04 02:47:36 +02:00
|
|
|
in {
|
2025-08-15 21:33:22 +02:00
|
|
|
options.mySystem.services.sunshine = {
|
2025-07-05 00:02:39 +02:00
|
|
|
enable = mkEnableOption "Enables Sunshine";
|
2025-05-04 02:47:36 +02:00
|
|
|
autostart = mkEnableOption "Enables autostart";
|
|
|
|
};
|
|
|
|
config.services.sunshine = mkIf cfg.enable {
|
2025-07-05 00:02:39 +02:00
|
|
|
inherit (cfg) enable;
|
2025-05-04 02:47:36 +02:00
|
|
|
autoStart = cfg.autostart;
|
|
|
|
capSysAdmin = true;
|
|
|
|
openFirewall = true;
|
2025-08-15 21:33:22 +02:00
|
|
|
settings.sunshine_name = config.mySystem.networking.hostname;
|
2025-09-03 11:45:12 +02:00
|
|
|
applications.apps = [
|
|
|
|
{
|
|
|
|
name = "Desktop";
|
|
|
|
image-path = "desktop.png";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Low Res Desktop";
|
|
|
|
image-path = "desktop.png";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Steam Big Picture";
|
|
|
|
detached = ["setsid steam steam://open/bigpicture"];
|
|
|
|
prep-cmd = {
|
|
|
|
do = "";
|
|
|
|
undo = "setsid steam steam://close/bigpicture";
|
|
|
|
};
|
|
|
|
image-path = "steam.png";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "OpenTTD";
|
|
|
|
cmd = "openttd";
|
|
|
|
image-path = "/home/phundrak/.config/sunshine/covers/igdb_18074.png";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "OpenMW";
|
|
|
|
cmd = "openmw";
|
|
|
|
}
|
|
|
|
];
|
2025-05-04 02:47:36 +02:00
|
|
|
};
|
|
|
|
}
|