enable sunshine
This commit is contained in:
parent
7422e7a335
commit
55bb74d440
@ -16,7 +16,7 @@
|
|||||||
customProfiles.hoyo
|
customProfiles.hoyo
|
||||||
customProfiles.minecraft
|
customProfiles.minecraft
|
||||||
customProfiles.nicotine
|
customProfiles.nicotine
|
||||||
# customProfiles.sunshine
|
customProfiles.sunshine
|
||||||
customProfiles.wine-games
|
customProfiles.wine-games
|
||||||
|
|
||||||
customProfiles.ollama
|
customProfiles.ollama
|
||||||
|
16
profiles/applications/games/sunshine.nix
Normal file
16
profiles/applications/games/sunshine.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ ... }: {
|
||||||
|
services.sunshine = {
|
||||||
|
enable = true;
|
||||||
|
autoStart = true;
|
||||||
|
capSysAdmin = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# boot.kernelModules = [ "uinput" ];
|
||||||
|
|
||||||
|
# services.udev.extraRules = ''
|
||||||
|
# KERNEL=="uinput", GROUP="input", MODE="0660" OPTIONS+="static_node=uinput"
|
||||||
|
# '';
|
||||||
|
|
||||||
|
persist.state.homeDirectories = [ ".config/sunshine" ];
|
||||||
|
}
|
@ -1,31 +0,0 @@
|
|||||||
{ config, pkgs, ... }: {
|
|
||||||
boot.kernelModules = [ "uinput" ];
|
|
||||||
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
KERNEL=="uinput", GROUP="input", MODE="0660" OPTIONS+="static_node=uinput"
|
|
||||||
'';
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.sunshine ];
|
|
||||||
|
|
||||||
security.wrappers.sunshine = {
|
|
||||||
owner = "root";
|
|
||||||
group = "root";
|
|
||||||
capabilities = "cap_sys_admin+p";
|
|
||||||
source = "${pkgs.sunshine}/bin/sunshine";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.sunshine = {
|
|
||||||
description = "sunshine";
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${config.security.wrapperDir}/sunshine";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall = {
|
|
||||||
allowedTCPPorts = [ 47984 47989 47990 48010 ];
|
|
||||||
allowedUDPPorts = [ 47998 47999 48000 48002 48010 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
persist.state.homeDirectories = [ ".config/sunshine" ];
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user