diff --git a/flake.lock b/flake.lock index 0dbc8be..ca09efd 100644 --- a/flake.lock +++ b/flake.lock @@ -474,14 +474,14 @@ "proton-ge": { "flake": false, "locked": { - "lastModified": 1700610476, - "narHash": "sha256-IoClZ6hl2lsz9OGfFgnz7vEAGlSY2+1K2lDEEsJQOfU=", + "lastModified": 1707701731, + "narHash": "sha256-ZBOF1N434pBQ+dJmzfJO9RdxRndxorxbJBZEIifp0w4=", "type": "tarball", - "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz" + "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-32/GE-Proton8-32.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz" + "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-32/GE-Proton8-32.tar.gz" } }, "ren": { diff --git a/flake.nix b/flake.nix index e788132..1c464c6 100644 --- a/flake.nix +++ b/flake.nix @@ -176,7 +176,7 @@ proton-ge = { # https://github.com/GloriousEggroll/proton-ge-custom/releases url = - "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-25/GE-Proton8-25.tar.gz"; + "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-32/GE-Proton8-32.tar.gz"; flake = false; }; diff --git a/modules/nixos/gaming/steam.nix b/modules/nixos/gaming/steam.nix index bb93a0f..51758ce 100644 --- a/modules/nixos/gaming/steam.nix +++ b/modules/nixos/gaming/steam.nix @@ -9,6 +9,14 @@ programs.steam = { enable = true; remotePlay.openFirewall = true; + package = pkgs.steam.override { + # Adapted in part from: https://github.com/Shawn8901/nix-configuration/blob/1c48be94238a9f463cf0bbd1e1842a4454286514/modules/nixos/steam-compat-tools/default.nix + # Based on: https://github.com/NixOS/nixpkgs/issues/73323 + extraEnv = { + STEAM_EXTRA_COMPAT_TOOLS_PATHS = + lib.makeBinPath [ pkgs.proton-ge-custom ]; + }; + }; }; environment.systemPackages = with pkgs; [ @@ -22,11 +30,6 @@ ]; - # Adapted in part from: https://github.com/Shawn8901/nix-configuration/blob/1c48be94238a9f463cf0bbd1e1842a4454286514/modules/nixos/steam-compat-tools/default.nix - # Based on: https://github.com/NixOS/nixpkgs/issues/73323 - environment.sessionVariables.STEAM_EXTRA_COMPAT_TOOLS_PATHS = - lib.makeBinPath [ pkgs.proton-ge-custom ]; - # Seems like NetworkManager can help speed up Steam launch # https://www.reddit.com/r/archlinux/comments/qguhco/steam_startup_time_arch_1451_seconds_fedora_34/hi8opet/ networking.networkmanager.enable = true; diff --git a/overlays/proton-ge.nix b/overlays/proton-ge.nix index bb939ed..a3b1dd0 100644 --- a/overlays/proton-ge.nix +++ b/overlays/proton-ge.nix @@ -5,11 +5,16 @@ inputs: _final: prev: { proton-ge-custom = prev.stdenv.mkDerivation (finalAttrs: rec { name = "proton-ge-custom"; - version = "0.1"; # Made up + version = prev.lib.removeSuffix "\n" (builtins.head + (builtins.match ".*GE-Proton(.*)" + (builtins.readFile "${inputs.proton-ge}/version"))); src = inputs.proton-ge; + # Took from https://github.com/AtaraxiaSjel/nur/blob/cf83b14b102985a587a498ba2c56f9f2bd9b9eb6/pkgs/proton-ge/default.nix installPhase = '' + runHook preBuild mkdir -p $out/bin cp -r ${src}/* -t $out/bin/ + runHook postBuild ''; }); }