Remove sunshine.nix

it is now part of nixpkgs
This commit is contained in:
insert 2024-05-04 14:32:49 -04:00
parent c8229f6f26
commit 2d0fcbe30a
Signed by: insert
GPG key ID: A70775C389ACF105
2 changed files with 6 additions and 53 deletions

View file

@ -1,7 +1,6 @@
{ inputs, config, lib, pkgs, ... }: { inputs, config, lib, pkgs, ... }:
{ {
environment.etc.nixpkgs.source = inputs.nixpkgs; environment.etc.nixpkgs.source = inputs.nixpkgs;
imports = [ ./sunshine.nix ];
networking.hostName = "insertpclinux"; networking.hostName = "insertpclinux";
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];
#nixpkgs.overlays = [ (self: super: (let #nixpkgs.overlays = [ (self: super: (let
@ -14,6 +13,12 @@
# })) ]; # })) ];
#boot.kernelPackages = pkgs.linuxPackages; #boot.kernelPackages = pkgs.linuxPackages;
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
};
hardware.nvidia = { hardware.nvidia = {
# Modesetting is needed most of the time # Modesetting is needed most of the time
@ -41,7 +46,6 @@
}; };
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
services.sunshine.enable = true;
security.pki.certificateFiles = [ security.pki.certificateFiles = [
/home/insert/Documents/nextcloud/nextcloudinternal.pem /home/insert/Documents/nextcloud/nextcloudinternal.pem
/home/insert/Documents/personal-vaultwarden/cert.pem /home/insert/Documents/personal-vaultwarden/cert.pem

View file

@ -1,51 +0,0 @@
{ config, lib, pkgs, ... }:
#source: https://github.com/RandomNinjaAtk/nixos/blob/d2480c148e882f49e5caa6267060fd2d9e10af9b/services.sunshine.nix
#https://discourse.nixos.org/t/sunshine-self-hosted-game-stream/25608/16
with lib;
let
cfg = config.services.sunshine;
in
{
options = {
services.sunshine = {
enable = mkEnableOption (mdDoc "Sunshine");
};
};
config = mkIf config.services.sunshine.enable {
environment.systemPackages = [
pkgs.sunshine
];
security.wrappers.sunshine = {
owner = "root";
group = "root";
capabilities = "cap_sys_admin+p";
source = "${pkgs.sunshine}/bin/sunshine";
};
# Requires to simulate input
boot.kernelModules = [ "uinput" ];
services.udev.extraRules = ''
KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"
'';
systemd.user.services.sunshine =
{
description = "sunshine";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${config.security.wrapperDir}/sunshine";
};
};
};
}