about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorAtemu <atemu.main@gmail.com>2024-03-23 14:55:51 +0000
committerGitHub <noreply@github.com>2024-03-23 14:55:51 +0000
commit428db5ac2af833f5a5e527f42399725514c9e032 (patch)
tree1215001056ccd8d92adfa033a39f63cbfc23bfc6 /nixos/modules
parentb816e991b660e8d718eebe4e01812078558ca02b (diff)
parent4c3e56ecb30e11a5007d6c021f583a6905fc617e (diff)
Merge pull request #296724 from Lord-Valen/backport-296009-to-release-23.11
[Backport release-23.11] steam: add extraCompatPackages
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/programs/steam.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix
index 29c449c16946c..8a0148658af38 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 = makeSearchPathOutput "steamcompattool" "" cfg.extraCompatPackages;
+        }) // (prev.extraEnv or {});
         extraLibraries = pkgs: let
           prevLibs = if prev ? extraLibraries then prev.extraLibraries pkgs else [ ];
           additionalLibs = with config.hardware.opengl;
@@ -66,6 +69,23 @@ in {
       '';
     };
 
+    extraCompatPackages = mkOption {
+      type = types.listOf types.package;
+      default = [ ];
+      example = literalExpression ''
+        with pkgs; [
+          proton-ge-bin
+        ]
+      '';
+      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.
+
+        These packages must be Steam compatibility tools that have a `steamcompattool` output.
+      '';
+    };
+
     remotePlay.openFirewall = mkOption {
       type = types.bool;
       default = false;