This commit is contained in:
Lilith 2025-04-25 11:30:51 +02:00
parent 8d4db8e8ca
commit f00a49d4d4
Signed by: lilith
GPG key ID: 8712A0F317C37175
5 changed files with 53 additions and 18 deletions

View file

@ -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 {