summaryrefslogtreecommitdiff
path: root/system/gaming
diff options
context:
space:
mode:
Diffstat (limited to 'system/gaming')
-rw-r--r--system/gaming/default.nix5
-rw-r--r--system/gaming/steam.nix34
2 files changed, 39 insertions, 0 deletions
diff --git a/system/gaming/default.nix b/system/gaming/default.nix
new file mode 100644
index 0000000..acb0a1f
--- /dev/null
+++ b/system/gaming/default.nix
@@ -0,0 +1,5 @@
+{...}: {
+ imports = [
+ ./steam.nix
+ ];
+}
diff --git a/system/gaming/steam.nix b/system/gaming/steam.nix
new file mode 100644
index 0000000..cd243e5
--- /dev/null
+++ b/system/gaming/steam.nix
@@ -0,0 +1,34 @@
+{
+ lib,
+ config,
+ ...
+}: let
+ inherit (lib) mkIf;
+ cfg = config.gaming.steam;
+in {
+ config = mkIf cfg.enable {
+ 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;
+ };
+}