From fc2563a58d29afc7c77d57af619337c0e8eea138 Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Wed, 7 Dec 2022 22:16:53 +0300 Subject: [PATCH] setup sunshine + moonlight --- machines/AMD-Workstation/default.nix | 1 + profiles/applications/packages.nix | 1 + profiles/applications/sunshine.nix | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 profiles/applications/sunshine.nix diff --git a/machines/AMD-Workstation/default.nix b/machines/AMD-Workstation/default.nix index 72450d9..fbc9db4 100644 --- a/machines/AMD-Workstation/default.nix +++ b/machines/AMD-Workstation/default.nix @@ -5,6 +5,7 @@ nixosProfiles.stable-diffusion nixosProfiles.a2ln-server + nixosProfiles.sunshine ]; deviceSpecific.devInfo = { diff --git a/profiles/applications/packages.nix b/profiles/applications/packages.nix index 482a0bd..05390b8 100644 --- a/profiles/applications/packages.nix +++ b/profiles/applications/packages.nix @@ -95,6 +95,7 @@ with config.deviceSpecific; { gamescope goverlay lutris + moonlight-qt obs-studio polymc reshade-shaders diff --git a/profiles/applications/sunshine.nix b/profiles/applications/sunshine.nix new file mode 100644 index 0000000..226e169 --- /dev/null +++ b/profiles/applications/sunshine.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: { + home-manager.users.alukard = { + home.packages = [ pkgs.sunshine ]; + systemd.user.services.sunshine = { + Unit.Description = "Sunshine is a Gamestream host for Moonlight."; + Service.ExecStart = "${pkgs.sunshine}/bin/sunshine"; + Install.WantedBy = [ "graphical-session.target" ]; + }; + }; + networking.firewall = { + allowedTCPPorts = [ + 47984 47989 48010 + 47990 + ]; + allowedUDPPorts = [ + 47998 47999 48000 48002 48010 + ]; + }; +} \ No newline at end of file