dot

NixOS dotfiles
git clone https://git.echoz.io/dot.git
Log | Files | Refs

commit 0953470b9e2282a4967e56a0601097f4d5f70f4f
parent 66cad71849184b35f1f7dc7d8b3e3d29bd27fd63
Author: Chris <chris@echoz.io>
Date:   Thu,  5 Feb 2026 16:55:40 +0100

feat: add cyberpunk 2077 mods

Diffstat:
Mmodules/games/default.nix | 1+
Amodules/games/mods/cyberpunk-2077.nix | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmodules/games/mods/gta-iv.nix | 38+++++++++++++++++++++++++++++++-------
3 files changed, 99 insertions(+), 7 deletions(-)

diff --git a/modules/games/default.nix b/modules/games/default.nix @@ -12,6 +12,7 @@ packages = with pkgs; [ tt (callPackage ./mods/gta-iv.nix { }) + (callPackage ./mods/cyberpunk-2077.nix { }) ]; }; } diff --git a/modules/games/mods/cyberpunk-2077.nix b/modules/games/mods/cyberpunk-2077.nix @@ -0,0 +1,67 @@ +{ + lib, + fetchzip, + symlinkJoin, + writeShellApplication, + writeText, +}: +let + mods = symlinkJoin { + name = "cyberpunk-2077-mods"; + paths = [ + (fetchzip { + url = "https://github.com/jackhumbert/let_there_be_flight/releases/download/v0.3.17/let_there_be_flight_v0.3.17.zip"; + hash = "sha256-FJt67+GvHHuUnqFCriHcCmR1FmuhOks0/q+NX/5NMEo="; + stripRoot = false; + }) + (fetchzip { + url = "https://github.com/psiberx/cp2077-archive-xl/releases/download/v1.26.2/ArchiveXL-1.26.2.zip"; + hash = "sha256-Wv1neeovyRULJDb3RotTp9G7IbRfOrlapGfpsUVOgyk="; + stripRoot = false; + }) + (fetchzip { + url = "https://github.com/psiberx/cp2077-tweak-xl/releases/download/v1.11.3/TweakXL-1.11.3.zip"; + hash = "sha256-8uhdgPEJtcwt3ow0/9CXqvv5ikqbzvs37CRsAbVFpj0="; + stripRoot = false; + }) + (fetchzip { + url = "https://github.com/jackhumbert/cyberpunk2077-input-loader/releases/download/v0.2.3/input_loader_v0.2.3.zip"; + hash = "sha256-8uhdgPEJtcwt3ow0/9CXqvv5ikqbzvs37CRsAbVFpj0="; + stripRoot = false; + }) + (fetchzip { + url = "https://github.com/jac3km4/redscript/releases/download/v0.5.31/redscript-v0.5.31-windows.zip"; + hash = "sha256-8uhdgPEJtcwt3ow0/9CXqvv5ikqbzvs37CRsAbVFpj0="; + stripRoot = false; + }) + (fetchzip { + url = "https://github.com/jackhumbert/mod_settings/releases/download/v0.2.21/mod_settings_v0.2.21.zip"; + hash = "sha256-8uhdgPEJtcwt3ow0/9CXqvv5ikqbzvs37CRsAbVFpj0="; + stripRoot = false; + }) + (fetchzip { + url = "https://github.com/wopss/RED4ext/releases/download/v1.29.1/red4ext_1.29.1.zip"; + hash = "sha256-O2x0STCR8pe8hg3YkLm8b1/j3RZXppfBljX5xYhPcbY="; + stripRoot = false; + }) + ]; + }; + help = writeText "cyberpunk-2077-info" '' + Remember to add to launch options: + + WINEDLLOVERRIDES="winmm,version=n,b" %command% + ''; +in +writeShellApplication { + name = "install-mods-cyberpunk-2077"; + text = '' + out="''${1:-}" + if [ -z "$out" ]; then + out="$HOME/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Cyberpunk 2077" + printf "Defaulting to: %s\n" "$out" >&2 + fi + pushd "$out" + cp -vriL --no-preserve=mode ${mods}/. . + cat ${help} + ''; +} diff --git a/modules/games/mods/gta-iv.nix b/modules/games/mods/gta-iv.nix @@ -1,9 +1,12 @@ { lib, + fetchzip, p7zip, + runCommand, + symlinkJoin, unrar-free, writeShellApplication, - fetchzip, + writeText, }: let fusion-fix = fetchzip { @@ -12,12 +15,36 @@ let stripRoot = false; }; - radio-restorer = fetchzip { + radio-restorer-release = fetchzip { url = "https://github.com/Tomasak/GTA-Downgraders/releases/download/iv-latest/Radio.Restoration.Mod.23-05-2025.rar"; hash = "sha256-PpXXootagsYdFMR1EOoRS0PPijNlV6IJeFg1Ae5GLXs="; nativeBuildInputs = [ unrar-free ]; stripRoot = false; }; + + radio-restorer = runCommand "radio-restorer" { + buildInputs = [ p7zip ]; + } '' + mkdir $out && pushd $out + 7z x ${lib.escapeShellArg radio-restorer-release}/"Resources/Radio Restorer/data1.dat" -y + 7z x ${lib.escapeShellArg radio-restorer-release}/"Resources/Radio Restorer/opVANILLA.dat" -y + 7z x ${lib.escapeShellArg radio-restorer-release}/"Resources/Radio Restorer/opSPLITbase.dat" -y + 7z x ${lib.escapeShellArg radio-restorer-release}/"Resources/Radio Restorer/opSPLITVANILLA.dat" -y + ''; + + mods = symlinkJoin { + name = "gta-iv-mods"; + paths = [ + fusion-fix + radio-restorer + ]; + }; + + help = writeText "gta-iv-mods-info" '' + Remember to add to launch options: + + WINEDLLOVERRIDES="dinput8=n,b" %command% + ''; in writeShellApplication { name = "install-mods-gta-iv"; @@ -31,10 +58,7 @@ writeShellApplication { printf "Defaulting to: %s\n" "$out" >&2 fi pushd "$out" - cp -vr --no-preserve=all ${lib.escapeShellArg fusion-fix}/. . - 7z x ${lib.escapeShellArg radio-restorer}/"Resources/Radio Restorer/data1.dat" -y - 7z x ${lib.escapeShellArg radio-restorer}/"Resources/Radio Restorer/opVANILLA.dat" -y - 7z x ${lib.escapeShellArg radio-restorer}/"Resources/Radio Restorer/opSPLITbase.dat" -y - 7z x ${lib.escapeShellArg radio-restorer}/"Resources/Radio Restorer/opSPLITVANILLA.dat" -y + cp -vriL --no-preserve=mode ${mods}/. . + cat ${help} ''; }