Remove: Gaming / Sunshine / NVIDIA
This commit is contained in:
parent
9dba2b3b6e
commit
0b9d40a96f
4 changed files with 0 additions and 128 deletions
17
gaming.nix
17
gaming.nix
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue