From 328c741b1aac74020412e99e0dca7c728dbc92fa Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 23 Jun 2025 22:33:44 -0400 Subject: refactor --- modules/gaming/steam.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 modules/gaming/steam.nix (limited to 'modules/gaming/steam.nix') diff --git a/modules/gaming/steam.nix b/modules/gaming/steam.nix new file mode 100644 index 0000000..53ab252 --- /dev/null +++ b/modules/gaming/steam.nix @@ -0,0 +1,34 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf; + cfg = config.gaming; +in { + config = mkIf cfg.steam { + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "steam" + "steam-original" + "steam-runtime" + ]; + + programs.gamescope = { + enable = true; + capSysNice = true; + }; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + gamescopeSession.enable = true; + }; + + # controllers + hardware.xone.enable = true; + hardware.steam-hardware.enable = true; + }; +} -- cgit v1.2.3-freya