Add basic conf for sunshine game streaming on NixOS
This commit is contained in:
parent
5e70208aef
commit
78d7227471
7 changed files with 75 additions and 1 deletions
17
gaming.nix
Normal file
17
gaming.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
16
hardware-specific/nvidia.nix
Normal file
16
hardware-specific/nvidia.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
nvidia = {
|
||||
open = true;
|
||||
forceFullCompositionPipeline = true;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = pkgs.lib.mkIf config.services.xserver.enable {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
};
|
||||
}
|
25
machine-confs/gaming.nix
Normal file
25
machine-confs/gaming.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "gaming";
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../users/vili.nix
|
||||
../desktop.nix
|
||||
../gaming.nix
|
||||
../services/sunshine.nix
|
||||
# ../hardware-specific/nvidia.nix
|
||||
];
|
||||
|
||||
users.users.vili.hashedPasswordFile = pkgs.lib.mkForce null;
|
||||
|
||||
swapDevices = pkgs.lib.mkForce [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
services.qemuGuest.enable = true;
|
||||
}
|
|
@ -72,7 +72,7 @@
|
|||
../onlykey.nix
|
||||
../services/syncthing.nix
|
||||
../services/redshift.nix
|
||||
../services/game-streaming.nix
|
||||
../services/moonlight.nix
|
||||
../hardware-specific/keychron-q11.nix
|
||||
../hardware-specific/trackball.nix
|
||||
../hardware-specific/amd-laptop.nix
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
../onlykey.nix
|
||||
../services/syncthing.nix
|
||||
../services/redshift.nix
|
||||
../services/moonlight.nix
|
||||
../hardware-specific/keychron-q11.nix
|
||||
../hardware-specific/trackball.nix
|
||||
../hardware-specific/usb-automount.nix
|
||||
|
|
15
services/sunshine.nix
Normal file
15
services/sunshine.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.services.xserver.enable;
|
||||
message = "Game streaming does not work without a desktop!";
|
||||
}
|
||||
];
|
||||
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue