Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NixOS module request: sunshine #293298

Closed
Cryolitia opened this issue Mar 4, 2024 · 4 comments · Fixed by #294641
Closed

NixOS module request: sunshine #293298

Cryolitia opened this issue Mar 4, 2024 · 4 comments · Fixed by #294641
Labels
0.kind: enhancement Add something new 9.needs: module (new) This needs a module to be created

Comments

@Cryolitia
Copy link
Member

Project description

Sunshine has already been packaged here in nixpkgs: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/servers/sunshine/default.nix

But it doesn't come out of the box just by nix run nixpkgs#sunshine, according to https://www.reddit.com/r/NixOS/comments/19137rt/getting_sunshine_to_run/ and https://www.reddit.com/r/NixOS/comments/12bjfam/sunshine_error/ and https://discourse.nixos.org/t/sunshine-self-hosted-game-stream/25608 , at least it needs a security.wrappers and maybe boot.kernelModules = [ "uinput" ]; . It would be better if we could add a NixOS module for it to make it availale just by sth. like services.sunshine.enable or programs.sunshine.enable .

CC maintainer @devusb


Add a 👍 reaction to issues you find important.

@Cryolitia Cryolitia added 0.kind: packaging request Request for a new package to be added 0.kind: enhancement Add something new 9.needs: module (new) This needs a module to be created and removed 0.kind: packaging request Request for a new package to be added labels Mar 4, 2024
@devusb
Copy link
Contributor

devusb commented Mar 4, 2024

This has been on my to-do list for ages :) The module itself wouldn't be a huge deal, and I think I have a plan for tests, just need some time to work on it.

@so-lar-is
Copy link

so-lar-is commented Mar 7, 2024

I actually started working on this a while ago. My module can create valid sunshine.conf and apps.json files (i.e. they work when I start sunshine manually) and open the necessary ports, however I couldn't get the systemd service to function properly. If I recall correctly, the issue was related to getting access to the screen.

Here is what I have so far, maybe it can help someone:
https://gist.github.com/so-lar-is/85cc71eff5d2cf4f5e362a2c17881302

@devusb
Copy link
Contributor

devusb commented Mar 10, 2024

Thanks @so-lar-is! I used yours as inspiration and opened #294641 for this. It's still a draft -- I need to work on the tests -- but any testing or comments are welcome. I've tested on Plasma 6 + Wayland + AMD and seems to work, have not tested much with Xorg or NVIDIA.

@devusb devusb mentioned this issue Mar 17, 2024
13 tasks
@devusb
Copy link
Contributor

devusb commented Mar 17, 2024

Think it's got all the functionality I had planned -- marked as ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 9.needs: module (new) This needs a module to be created
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants