about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorShawn8901 <shawn8901@googlemail.com>2024-02-20 20:21:35 +0100
committerLord-Valen <lord_valen@protonmail.com>2024-03-17 14:21:42 -0400
commitee29bb3947744d865d2891e69b22f7ab6b5c61f0 (patch)
treefc1bb4f725cfa55f7cbe9159881047ad164a35a2 /nixos/modules
parent614b4613980a522ba49f0d194531beddbb7220d3 (diff)
steam: add extraCompatPackages
(cherry picked from commit 93a891f0e8e0feb96090eac48d9a2d5aaad28f20)
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/programs/steam.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix
index 29c449c16946c..5b883492016ce 100644
--- a/nixos/modules/programs/steam.nix
+++ b/nixos/modules/programs/steam.nix
@@ -43,6 +43,9 @@ in {
         }
       '';
       apply = steam: steam.override (prev: {
+        extraEnv = (lib.optionalAttrs (cfg.extraCompatPackages != [ ]) {
+            STEAM_EXTRA_COMPAT_TOOLS_PATHS = makeBinPath cfg.extraCompatPackages;
+          }) // prev.extraEnv;
         extraLibraries = pkgs: let
           prevLibs = if prev ? extraLibraries then prev.extraLibraries pkgs else [ ];
           additionalLibs = with config.hardware.opengl;
@@ -66,6 +69,16 @@ in {
       '';
     };
 
+    extraCompatPackages = mkOption {
+      type = types.listOf types.package;
+      default = [ ];
+      description = lib.mdDoc ''
+        Extra packages to be used as compatibility tools for Steam on Linux. Packages will be included
+        in the `STEAM_EXTRA_COMPAT_TOOLS_PATHS` environmental variable. For more information see
+        <https://github.com/ValveSoftware/steam-for-linux/issues/6310">.
+      '';
+    };
+
     remotePlay.openFirewall = mkOption {
       type = types.bool;
       default = false;