From 93a891f0e8e0feb96090eac48d9a2d5aaad28f20 Mon Sep 17 00:00:00 2001 From: Shawn8901 Date: Tue, 20 Feb 2024 20:21:35 +0100 Subject: [PATCH] steam: add extraCompatPackages --- nixos/modules/programs/steam.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix index d6e2a82af100..d9fe8f54efd8 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; @@ -68,6 +71,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 + . + ''; + }; + remotePlay.openFirewall = mkOption { type = types.bool; default = false;