nixos/steam: add option extraPackages

This commit is contained in:
北雁 Cryolitia 2024-05-26 22:03:50 +08:00
parent b40e28775b
commit efef69a51d
No known key found for this signature in database
GPG Key ID: 3E5D1772FC8A8EDD

View File

@ -55,6 +55,7 @@ in {
then [ package ] ++ extraPackages
else [ package32 ] ++ extraPackages32;
in prevLibs ++ additionalLibs;
extraPkgs = p: (cfg.extraPackages ++ lib.optionals (prev ? extraPkgs) (prev.extraPkgs p));
} // lib.optionalAttrs (cfg.gamescopeSession.enable && gamescopeCfg.capSysNice)
{
buildFHSEnv = pkgs.buildFHSEnv.override {
@ -71,6 +72,19 @@ in {
'';
};
extraPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
example = lib.literalExpression ''
with pkgs; [
gamescope
]
'';
description = ''
Additional packages to add to the Steam environment.
'';
};
extraCompatPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];