32 lines
804 B
Nix
Raw Normal View History

2024-02-08 23:21:10 +03:00
{ config, pkgs, ... }: {
2023-05-16 21:56:54 +03:00
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";
2022-12-07 22:16:53 +03:00
};
};
2023-05-16 21:56:54 +03:00
2022-12-07 22:16:53 +03:00
networking.firewall = {
2024-02-08 23:21:10 +03:00
allowedTCPPorts = [ 47984 47989 47990 48010 ];
allowedUDPPorts = [ 47998 47999 48000 48002 48010 ];
2022-12-07 22:16:53 +03:00
};
2023-03-27 20:57:06 +03:00
2023-05-16 21:56:54 +03:00
persist.state.homeDirectories = [ ".config/sunshine" ];
}