Commit 3c66da6

HPCesia <me@hpcesia.com>
2026-02-04 14:37:02
feat: proton-cachyos
1 parent af7327f
Changed files (2)
modules
pkgs
by-name
proton-cachyos-bin
modules/game/lutris.nix
@@ -12,6 +12,7 @@
         hash = "sha256-s2xnoyRy4JI1weRJ+9wjZzBRpsH7HMbK9DbhdVDJKww=";
       };
     };
+    proton-cachyos-bin_latest = pkgs.local.proton-cachyos-bin;
   in {
     programs.lutris = {
       enable = true;
@@ -20,6 +21,7 @@
       protonPackages = [
         proton-ge-bin_latest
         proton-ge-bin_10-18
+        proton-cachyos-bin_latest
       ];
       winePackages = [
         pkgs.wineWow64Packages.full
pkgs/by-name/proton-cachyos-bin/package.nix
@@ -0,0 +1,54 @@
+# From https://github.com/powerofthe69/nix-gaming-edge
+{
+  pkgs,
+  renameInternalName ? true,
+}:
+pkgs.stdenv.mkDerivation {
+  pname = "proton-cachyos";
+  version = "10.0-20260127-slr";
+
+  src = pkgs.fetchurl {
+    url = "https://github.com/CachyOS/proton-cachyos/releases/download/cachyos-10.0-20260127-slr/proton-cachyos-10.0-20260127-slr-x86_64_v2.tar.xz";
+    hash = "sha256-f6KfS7XDLioCKnGQ8gMgXSsQ3mExlfQ8yRvBVRt/dW4=";
+  };
+
+  nativeBuildInputs = [pkgs.xz];
+  outputs = [
+    "out"
+    "steamcompattool"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    # Create the steamcompat directory
+    mkdir -p $steamcompattool
+    cp -r ./* $steamcompattool/
+
+    # Modify the display name
+    sed -i -r "s|\"display_name\".*|\"display_name\" \"Proton CachyOS\"|" \
+      $steamcompattool/compatibilitytool.vdf
+
+    ${pkgs.lib.optionalString renameInternalName ''
+      sed -i -r 's|"proton-cachyos-[^"]*"(\s*// Internal name)|"Proton CachyOS"\1|' $steamcompattool/compatibilitytool.vdf
+    ''}
+
+    # Create a real folder so that Steam doesn't require reselecting compatibility tool on update
+    mkdir -p $out/share/
+
+    # Create a real folder so that Steam doesn't require reselecting compatibility tool on update
+    mkdir -p $out/share/steam/compatibilitytools.d/proton-cachyos
+
+    #Symlink the files INSIDE, not the folder itself. Oopsie
+    ln -s $steamcompattool/* $out/share/steam/compatibilitytools.d/proton-cachyos/
+
+    runHook postInstall
+  '';
+
+  meta = with pkgs.lib; {
+    description = "Optimized Proton by CachyOS";
+    homepage = "https://github.com/CachyOS/proton-cachyos";
+    license = licenses.bsd3;
+    platforms = ["x86_64-linux"];
+  };
+}