diff --git a/roles/gaming/programs/pcsx2.nix b/roles/gaming/programs/pcsx2.nix index c2bd45e..b3f0939 100644 --- a/roles/gaming/programs/pcsx2.nix +++ b/roles/gaming/programs/pcsx2.nix @@ -1,7 +1,31 @@ -{pkgs, ...}: { +{pkgs, ...}: let + ps2-isos = [ + (pkgs.fetchzip { + url = "https://myrient.erista.me/files/Redump/Sony%20-%20PlayStation%202/007%20-%20Nightfire%20%28USA%29.zip"; + hash = "sha256-66Ey0SqC3Tk02Af+xR6rpxYSkO0n83NWYPCt4M3CUWo="; + }) + ]; + pcsx2-bios = pkgs.fetchzip { + url = "https://myrient.erista.me/files/Redump/Sony%20-%20PlayStation%202%20-%20BIOS%20Images/ps2-0200a-20040614.zip"; + hash = "sha256-wMvswgmsKl+cJl49VlVW84tvU5Jzd+2dl07SOiUDtwA="; + }; +in { home-manager.users.toast = { - home.packages = with pkgs; [ - pcsx2 - ]; + home = { + packages = with pkgs; [ + pcsx2 + ]; + file."Games/Isos/PS2".source = pkgs.symlinkJoin { + name = "ps2-isos"; + paths = [ps2-isos]; + }; + }; + xdg.dataFile = { + # I would prefer to use symlinkJoin like I do for the ISOs, but + # the bios folder needs to be writable to store the bios settings + "PCSX2/bios/ntsc.bin".source = pkgs.runCommandLocal "pcsx2-bios" {} '' + cp -v ${pcsx2-bios}/*.bin $out + ''; + }; }; }