diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2022-11-18 13:08:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-18 13:08:39 +0100 |
commit | 980e2c2ed2ae8032e501b313357600d92c8794a5 (patch) | |
tree | 9136a5bb4ca6f4f8433cf0f2105c98eb86e617d3 /nixos/modules/programs | |
parent | 9e4a35d13f528b0195c1be79613f6c25cbf02646 (diff) | |
parent | e8856a00da3de06369d68fd2e9960188f246a4a3 (diff) |
Merge pull request #196773 from bobvanderlinden/pr-steam-package
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/steam.nix | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix index adbbf5d9ed4b4..1b69aac98863b 100644 --- a/nixos/modules/programs/steam.nix +++ b/nixos/modules/programs/steam.nix @@ -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 { |