Commit 4ded262f authored by Patrick Steinhardt's avatar Patrick Steinhardt
Browse files

nixos/steam: allow overriding args passed to Steam in session

The Gamescope session executes Steam with a fixed set of arguments,
enabling its tenfoot interface. In some cases though one may want to
override these arguments, e.g. by using big picture more instead or
enabling SteamOS integration.

Introduce a new option that allows to override these arguments.
parent e34669ce
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ let
  in
    pkgs.writeShellScriptBin "steam-gamescope" ''
      ${builtins.concatStringsSep "\n" exports}
      gamescope --steam ${builtins.toString cfg.gamescopeSession.args} -- steam -tenfoot -pipewire-dmabuf
      gamescope --steam ${builtins.toString cfg.gamescopeSession.args} -- steam ${builtins.toString cfg.gamescopeSession.steamArgs}
    '';

  gamescopeSessionFile =
@@ -160,6 +160,17 @@ in {
              Environmental variables to be passed to GameScope for the session.
            '';
          };

          steamArgs = lib.mkOption {
            type = lib.types.listOf lib.types.str;
            default = [
              "-tenfoot"
              "-pipewire-dmabuf"
            ];
            description = ''
              Arguments to be passed to Steam for the session.
            '';
          };
        };
      };
    };