local
This commit is contained in:
parent
8d4db8e8ca
commit
f00a49d4d4
5 changed files with 53 additions and 18 deletions
|
|
@ -4,32 +4,36 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
gaming-host = lib.mkIf (!config.gaming.client-only);
|
||||
in
|
||||
{
|
||||
|
||||
options.gaming.enable = lib.mkEnableOption "Enable steam and related software";
|
||||
options.gaming.client-only = lib.mkEnableOption "Only enable steam, to stream via SteamLink";
|
||||
|
||||
config = lib.mkIf config.gaming.enable {
|
||||
programs = {
|
||||
gamescope = {
|
||||
gamescope = gaming-host {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
|
||||
steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
gamescopeSession.enable = gaming-host true;
|
||||
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
remotePlay.openFirewall = gaming-host true;
|
||||
dedicatedServer.openFirewall = gaming-host true;
|
||||
localNetworkGameTransfers.openFirewall = gaming-host true;
|
||||
};
|
||||
|
||||
gamemode.enable = true;
|
||||
gamemode.enable = gaming-host true;
|
||||
};
|
||||
|
||||
hardware.steam-hardware.enable = true;
|
||||
hardware.steam-hardware.enable = gaming-host true;
|
||||
|
||||
environment = {
|
||||
environment = gaming-host {
|
||||
systemPackages = with pkgs; [
|
||||
mangohud
|
||||
protonup
|
||||
|
|
@ -38,7 +42,7 @@
|
|||
};
|
||||
|
||||
# SteamVR kernel patch for AMDGPU
|
||||
boot.kernelPatches = [
|
||||
boot.kernelPatches = gaming-host [
|
||||
{
|
||||
name = "amdgpu-ignore-ctx-privileges";
|
||||
patch = pkgs.fetchpatch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue