add steam-compat-tools module

This commit is contained in:
Dmitriy Kholkin 2023-03-27 15:59:04 +03:00
parent 4c8f2b0bcc
commit f003e3af0f
4 changed files with 66 additions and 8 deletions

View File

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.programs.steam;
in {
options.programs.steam = {
extraCompatPackages = mkOption {
type = with types; listOf package;
default = [ ];
defaultText = literalExpression "[]";
example = literalExpression ''
with pkgs; [
luxtorpeda
proton-ge
]
'';
description = lib.mdDoc ''
Extra packages to be used as compatibility tools for Steam on Linux. Packages will be included
in the `STEAM_EXTRA_COMPAT_TOOLS_PATHS` environmental variable. For more information see
<https://github.com/ValveSoftware/steam-for-linux/issues/6310">.
'';
};
};
config = mkIf cfg.enable {
# Append the extra compatibility packages to whatever else the env variable was populated with.
# For more information see https://github.com/ValveSoftware/steam-for-linux/issues/6310.
environment.sessionVariables = mkIf (cfg.extraCompatPackages != [ ]) {
STEAM_EXTRA_COMPAT_TOOLS_PATHS = makeBinPath cfg.extraCompatPackages;
};
};
}

View File

@ -1,13 +1,8 @@
{ pkgs, lib, config, ... }: {
programs.steam.enable = true;
programs.java.enable = true;
programs.java.package = pkgs.jre8;
# programs.firejail.wrappedBinaries.steam = {
# executable = "${lib.getBin pkgs.steam}/bin/steam";
# profile = "${pkgs.firejail}/etc/firejail/steam.profile";
# };
programs.steam.extraCompatPackages = [
pkgs.proton-ge
];
startupApplications = [
"${pkgs.steam}/bin/steam"

View File

@ -27,6 +27,7 @@ with lib; {
microbin = pkgs.callPackage ./packages/microbin-pkg { };
mpris-ctl = pkgs.callPackage ./packages/mpris-ctl.nix { };
parsec = pkgs.callPackage ./packages/parsec.nix { };
proton-ge = pkgs.callPackage ./packages/proton-ge { };
protonhax = pkgs.callPackage ./packages/protonhax.nix { };
reshade-shaders = pkgs.callPackage ./packages/reshade-shaders.nix { };
rosepine-gtk-theme = pkgs.callPackage ./packages/rosepine-gtk-theme.nix { };

View File

@ -0,0 +1,31 @@
{ stdenv
, lib
, fetchurl
, writeScript
,
}:
stdenv.mkDerivation rec {
name = "proton-ge-custom";
version = "GE-Proton7-53";
src = fetchurl {
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${version}/${version}.tar.gz";
sha256 = "sha256-J3e/WM/Cms8uqCOcjIQjFQZJL++rrIenhnpLsCbwwXA=";
};
passthru.runUpdate = true;
# passthru.updateScript = ./update.sh;
buildCommand = ''
mkdir -p $out/bin
tar -C $out/bin --strip=1 -x -f $src
'';
meta = with lib; {
description = "Compatibility tool for Steam Play based on Wine and additional components";
homepage = "https://github.com/GloriousEggroll/proton-ge-custom";
license = licenses.bsd3;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ ataraxiasjel ];
};
}