Remove: Gaming / Sunshine / NVIDIA

This commit is contained in:
Vili Sinervä 2025-02-20 20:46:44 +02:00
parent 9dba2b3b6e
commit 0b9d40a96f
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
4 changed files with 0 additions and 128 deletions

View file

@ -1,17 +0,0 @@
{ config, pkgs, ... }:
{
assertions = [
{
assertion = config.services.xserver.enable;
message = "Gaming does not work without a desktop!";
}
];
programs = {
steam = {
enable = true;
extraCompatPackages = [ pkgs.proton-ge-bin ];
};
gamemode.enable = true;
};
}

View file

@ -1,16 +0,0 @@
{ config, pkgs, ... }:
{
hardware = {
graphics.enable = true;
nvidia = {
open = true;
forceFullCompositionPipeline = true;
};
};
services = {
xserver = pkgs.lib.mkIf config.services.xserver.enable {
videoDrivers = [ "nvidia" ];
};
};
}

View file

@ -1,29 +0,0 @@
{ pkgs, ... }:
{
networking.hostName = "gaming";
imports = [
../base.nix
../users/vili.nix
../desktop.nix
../gaming.nix
../services/sunshine.nix
../hardware-specific/nvidia.nix
];
services.clatd = {
enable = true;
};
users.users.vili.hashedPasswordFile = pkgs.lib.mkForce null;
swapDevices = pkgs.lib.mkForce [
{
device = "/var/lib/swapfile";
size = 4 * 1024;
}
];
# HARDWARE SPECIFIC
services.qemuGuest.enable = true;
}

View file

@ -1,66 +0,0 @@
{ pkgs, config, ... }:
let
sunshineCuda = pkgs.sunshine.override {
cudaSupport = true;
stdenv = pkgs.cudaPackages.backendStdenv;
};
resolution_list = [
"1920x1080"
"2400x1080"
"2160x1440"
"2560x1440"
"3840x2160"
];
in
{
assertions = [
{
assertion = config.services.xserver.enable;
message = "Game streaming does not work without a desktop!";
}
];
services.sunshine = {
package = sunshineCuda;
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
settings = {
min_log_level = "debug";
encoder = "nvenc";
sunshine_name = "Gaming NixOS";
resolutions = ''
[
1920x1080,
2400x1080,
2160x1440,
2560x1440,
3840x2160
]
'';
fps = ''
[30, 60, 90, 120]
'';
address_family = "both";
};
applications = {
apps =
(
resolutions:
map (resolution: {
name = "${resolution} Desktop";
prep-cmd = [
{
do = "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-0 --mode ${resolution}";
undo = "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-0 --auto";
}
];
exclude-global-prep-cmd = "false";
auto-detach = "true";
}) resolutions
)
resolution_list;
};
};
}