diff --git a/flake.lock b/flake.lock index 300d7cf..11eddef 100644 --- a/flake.lock +++ b/flake.lock @@ -480,6 +480,18 @@ "type": "github" } }, + "proton-ge": { + "flake": false, + "locked": { + "narHash": "sha256-/68J3aVmHqrrcNk4DkYSBzfNyIQmbcUGg3yOlDq1ts8=", + "type": "tarball", + "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-14/GE-Proton8-14.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-14/GE-Proton8-14.tar.gz" + } + }, "root": { "inputs": { "Comment-nvim-src": "Comment-nvim-src", @@ -504,6 +516,7 @@ "nvim-lspconfig-src": "nvim-lspconfig-src", "nvim-tree-lua-src": "nvim-tree-lua-src", "nvim-treesitter-src": "nvim-treesitter-src", + "proton-ge": "proton-ge", "telescope-nvim-src": "telescope-nvim-src", "telescope-project-nvim-src": "telescope-project-nvim-src", "toggleterm-nvim-src": "toggleterm-nvim-src", diff --git a/flake.nix b/flake.nix index bd51543..322d477 100644 --- a/flake.nix +++ b/flake.nix @@ -157,6 +157,14 @@ flake = false; }; + # GE version of Proton for game compatibility + # Alternatively, could consider using https://github.com/fufexan/nix-gaming + proton-ge = { + url = + "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-14/GE-Proton8-14.tar.gz"; + flake = false; + }; + # Nextcloud Apps nextcloud-news = { url = @@ -216,6 +224,7 @@ (import ./overlays/nextcloud-apps.nix inputs) (import ./overlays/betterlockscreen.nix) (import ./overlays/age.nix inputs) + (import ./overlays/proton-ge.nix inputs) ]; # System types to support. diff --git a/modules/nixos/gaming/steam.nix b/modules/nixos/gaming/steam.nix index 8b22847..bb93a0f 100644 --- a/modules/nixos/gaming/steam.nix +++ b/modules/nixos/gaming/steam.nix @@ -22,6 +22,11 @@ ]; + # 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 new file mode 100644 index 0000000..bb939ed --- /dev/null +++ b/overlays/proton-ge.nix @@ -0,0 +1,15 @@ +# Adapted from: +# https://github.com/Shawn8901/nix-configuration/blob/182a45a6b193143ff7ff8e78bb66f7b869ea48d4/packages/proton-ge-custom/default.nix +# Based on: https://github.com/NixOS/nixpkgs/issues/73323 + +inputs: _final: prev: { + proton-ge-custom = prev.stdenv.mkDerivation (finalAttrs: rec { + name = "proton-ge-custom"; + version = "0.1"; # Made up + src = inputs.proton-ge; + installPhase = '' + mkdir -p $out/bin + cp -r ${src}/* -t $out/bin/ + ''; + }); +}