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.
This commit is contained in:
Patrick Steinhardt 2025-02-15 18:41:55 +01:00
commit 4ded262fbc

View file

@ -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.
'';
};
};
};
};