Merge pull request #196773 from bobvanderlinden/pr-steam-package

This commit is contained in:
Maciej Krüger 2022-11-18 13:08:39 +01:00 committed by GitHub
commit 980e2c2ed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,17 +4,31 @@ with lib;
let
cfg = config.programs.steam;
steam = pkgs.steam.override {
extraLibraries = pkgs: with config.hardware.opengl;
if pkgs.hostPlatform.is64bit
then [ package ] ++ extraPackages
else [ package32 ] ++ extraPackages32;
};
in {
options.programs.steam = {
enable = mkEnableOption (lib.mdDoc "steam");
package = mkOption {
type = types.package;
default = pkgs.steam.override {
extraLibraries = pkgs: with config.hardware.opengl;
if pkgs.hostPlatform.is64bit
then [ package ] ++ extraPackages
else [ package32 ] ++ extraPackages32;
};
defaultText = literalExpression ''
pkgs.steam.override {
extraLibraries = pkgs: with config.hardware.opengl;
if pkgs.hostPlatform.is64bit
then [ package ] ++ extraPackages
else [ package32 ] ++ extraPackages32;
}
'';
description = lib.mdDoc ''
steam package to use.
'';
};
remotePlay.openFirewall = mkOption {
type = types.bool;
default = false;
@ -44,7 +58,10 @@ in {
hardware.steam-hardware.enable = true;
environment.systemPackages = [ steam steam.run ];
environment.systemPackages = [
cfg.package
cfg.package.run
];
networking.firewall = lib.mkMerge [
(mkIf cfg.remotePlay.openFirewall {