dot

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

commit 7bac77462804cd51c875594ee7fcd3ed872b00c5
parent d0ce807af936c4ed652f22b7ea95d57825ba22f3
Author: Chris <chris@echoz.io>
Date:   Mon, 17 Nov 2025 23:51:22 +0100

feat(games): add script to install gta iv fusionfix + radio downgrade

Diffstat:
Amodules/games/default.nix | 10++++++++++
Amodules/games/mods/gta-iv.nix | 38++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/modules/games/default.nix b/modules/games/default.nix @@ -0,0 +1,10 @@ +{ + pkgs, + user, + ... +}: +{ + home-manager.users.${user}.home.packages = [ + (pkgs.callPackage ./mods/gta-iv.nix { }) + ]; +} diff --git a/modules/games/mods/gta-iv.nix b/modules/games/mods/gta-iv.nix @@ -0,0 +1,38 @@ +{ + lib, + p7zip, + unrar-free, + writeShellApplication, + fetchzip, +}: +let + fusion-fix = fetchzip { + url = "https://github.com/ThirteenAG/GTAIV.EFLC.FusionFix/releases/download/v4.0.5/GTAIV.EFLC.FusionFix.zip"; + hash = "sha256-bi6/TteAsIciihzDHbhMt4+RrO1N0Dydd7ZI44xloUM="; + stripRoot = false; + }; + + radio-restorer = 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; + }; +in +writeShellApplication { + name = "install-mods-gta-iv"; + runtimeInputs = [ + p7zip + ]; + text = '' + out="''${1:-}" + if [ -z "$out" ]; then + out="$HOME/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Grand Theft Auto IV/GTAIV" + 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 + ''; +}