Sunshine: Difference between revisions
Tags: Mobile edit Mobile web edit |
m fix formatting error |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
This page is intended to explain how to use Sunshine, an open-source implementation of | This page is intended to explain how to use Sunshine, an open-source implementation of NVIDIA’s GameStream protocol. | ||
== Install == | == Install == | ||
To install Sunshine | |||
To install Sunshine and enable it you can use the following snippet: | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
services.sunshine = { | |||
services | |||
enable = true; | enable = true; | ||
autoStart = true; | |||
capSysAdmin = true; # only needed for Wayland -- omit this when using with Xorg | |||
openFirewall = true; | |||
}; | }; | ||
</nowiki>}} | |||
For manual Firewall configuration you can open network ports as shown here: | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
networking.firewall = { | |||
enable = true; | |||
allowedTCPPorts = [ 47984 47989 47990 48010 ]; | |||
allowedUDPPortRanges = [ | |||
{ from = 47998; to = 48000; } | |||
{ from = 8000; to = 8010; } | |||
} | ]; | ||
}; | |||
</nowiki>}} | </nowiki>}} | ||
== Connecting to the host == | == Connecting to the host == | ||
Sunshine needs to be started with the <pre>sunshine</pre> command. | When installed via the NixOS module, Sunshine is configured as a Systemd user unit, and will start automatically on login to a graphical session. Note that a logout/login or restart may be required for Sunshine to start after initially adding it to your configuration due to limitations of NixOS' handling of user units with <code>nixos-rebuild</code>. | ||
If <code>services.sunshine.autoStart</code> is set to <code>false</code>, Sunshine needs to be started with the <pre>sunshine</pre> command. | |||
You may have to manually add the host running Sunshine to your Moonlight client. This, thankfully, is not hard to do. | You may have to manually add the host running Sunshine to your Moonlight client. This, thankfully, is not hard to do. |