diff --git a/roles/gaming/programs/cemu.nix b/roles/gaming/programs/cemu.nix index 588fd39..80178f8 100644 --- a/roles/gaming/programs/cemu.nix +++ b/roles/gaming/programs/cemu.nix @@ -2,6 +2,20 @@ home-manager.users.toast = { home = { packages = [pkgs.cemu]; + file = { + "Games/Isos/Wii U/Kirby and the Rainbow Paintbrush.wux".source = ( + pkgs.fetchurl { + url = "http://dl.everest.tailscale/Wii%20U/Kirby%20and%20the%20Rainbow%20Paintbrush.wux"; + hash = "sha256-taPGf709N2p3GlqqT92+SbOeD7QNKFUfB9X5urWVQps="; + } + ); + "Games/Isos/Wii U/Mario Kary 8.wux".source = ( + pkgs.fetchurl { + url = "http://dl.everest.tailscale/Wii%20U/Mario%20Kart%208.wux"; + hash = "sha256-O6lOkLUKPZi+FiEWJQQEeiEXOo+GTUecoSpGjE811k0="; + } + ); + }; }; }; } diff --git a/roles/gaming/programs/pcsx2.nix b/roles/gaming/programs/pcsx2.nix index b6ac4b2..b378ca2 100644 --- a/roles/gaming/programs/pcsx2.nix +++ b/roles/gaming/programs/pcsx2.nix @@ -3,15 +3,44 @@ lib, ... }: let + ps2-isos = pkgs.symlinkJoin { + name = "ps2-isos"; + paths = + lib.lists.forEach [ + (pkgs.fetchzip { + url = "https://myrient.erista.me/files/Redump/Sony%20-%20PlayStation%202/007%20-%20Nightfire%20%28USA%29.zip"; + hash = "sha256-66Ey0SqC3Tk02Af+xR6rpxYSkO0n83NWYPCt4M3CUWo="; + }) + (pkgs.fetchzip { + url = "https://myrient.erista.me/files/Redump/Sony%20-%20PlayStation%202/TimeSplitters%202%20%28USA%29.zip"; + hash = "sha256-UPED4/MF9fjTOgiIJy+CSbuO9cJr3CsR/gEquY6GfsU="; + }) + ] + compress; + }; + + compress = iso: + pkgs.runCommand "compressed-ps2-isos" {} '' + mkdir $out + cd ${iso} + for file in ./* + do + ${pkgs.mame-tools}/bin/chdman createdvd -i "$file" -o "$out/''${file%.iso}.chd" + done + ''; + 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 = ps2-isos; + }; xdg.configFile = { #PCSX2 silently overwrites the symlink so I need to force it's creation "PCSX2/inis/PCSX2.ini".force = true; @@ -121,10 +150,10 @@ in { }; home-manager.users.toast.xdg.configFile = { "PCSX2/.stignore".text = '' - cache + cahe bios gamesettings - inis/PCSX2.ini* + inis/PCSX2.int* inis/debuggersettings inputprofiles logs diff --git a/roles/gaming/programs/retroarch.nix b/roles/gaming/programs/retroarch.nix index 60f4bb7..ffa46a3 100644 --- a/roles/gaming/programs/retroarch.nix +++ b/roles/gaming/programs/retroarch.nix @@ -1,4 +1,22 @@ -{pkgs, ...}: { +{pkgs, ...}: let + snes-roms = [ + # ActRaiser + (pkgs.fetchzip { + url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/ActRaiser%20%28USA%29.zip"; + hash = "sha256-yxIL5Pqlp8xsx7wvNO1MlB8ffDjS0xpE+yrEfMj61As="; + }) + # Kirby Super Star + (pkgs.fetchzip { + url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Kirby%20Super%20Star%20%28USA%29.zip"; + hash = "sha256-NX5OjCthf4ZiAhamclRBRk8GiMjZX3JLeShm8sQdDfc="; + }) + # Super Mario Kart + (pkgs.fetchzip { + url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Super%20Mario%20Kart%20%28USA%29.zip"; + hash = "sha256-RLBxPBmBrXCuPdnWE07KamBNgGJ5IntQVUPeij+2HUI="; + }) + ]; +in { home-manager.users.toast = { home = { packages = [ @@ -44,6 +62,15 @@ } ) ]; + file."Games/Roms/SNES/" = { + onChange = '' + ${pkgs.retroarch}/bin/retroarch --scan "/home/toast/Games/Roms/SNES" + ''; + source = pkgs.symlinkJoin { + name = "snes-roms"; + paths = [snes-roms]; + }; + }; }; # Retroarch is dumb since it doesn't generate some folders (but it does for others) systemd.user.tmpfiles.rules = [ @@ -51,28 +78,6 @@ "d /%h/.local/share/retroarch/saves" "d /%h/.local/share/retroarch/states" ]; - systemd.user.paths = { - snes-roms = { - Unit.Description = "Monitor SNES rom path for changes"; - Path = { - PathChanged = "/%h/Games/SNES"; - Unit = "update-retroarch-library.service"; - }; - Install.WantedBy = ["default.target"]; - }; - }; - systemd.user.services.update-retroarch-library = { - Service = { - Type = "oneshot"; - ExecStart = pkgs.writeShellScript "scan-snes-games" '' - ${pkgs.libnotify}/bin/notify-send -a RetroArch \ - -i retroarch \ - "SNES games changed!" \ - "Scanning $TRIGGER_PATH..." - ${pkgs.retroarch}/bin/retroarch --scan "/home/toast/Games/SNES" - ''; - }; - }; }; # Sync saves and some other stuff diff --git a/roles/gaming/services/syncthing.nix b/roles/gaming/services/syncthing.nix index 0219bac..7b27b67 100644 --- a/roles/gaming/services/syncthing.nix +++ b/roles/gaming/services/syncthing.nix @@ -23,12 +23,6 @@ devices = ["server" "pc" "winmax2" "steamdeck"]; path = "~/.local/share/Steam/steamapps/compatdata/1761390/pfx/drive_c/users/steamuser/AppData/Roaming/EDEN/"; }; - "games" = { - label = "Games"; - id = "mwzph-gf2df"; - devices = ["server" "pc" "winmax2" "steamdeck"]; - path = "~/Games"; - }; }; home-manager.users.toast.home.file."steam-201810-ignore" = { target = ".local/share/Steam/steamapps/compatdata/201810/pfx/drive_c/users/steamuser/Saved Games/MachineGames/Wolfenstein The New Order/.stignore"; diff --git a/roles/server/syncthing.nix b/roles/server/syncthing.nix index 84d20cc..fe174f1 100755 --- a/roles/server/syncthing.nix +++ b/roles/server/syncthing.nix @@ -44,12 +44,6 @@ devices = ["server" "pc" "winmax2" "steamdeck"]; path = "${config.services.syncthing.dataDir}/project-eden-saves"; }; - "games" = { - label = "Games"; - id = "jxuou-2yjnu"; - devices = ["steamdeck" "server" "pc" "winmax2"]; - path = "${config.services.syncthing.dataDir}/games"; - }; }; }; systemd.services.syncthing.serviceConfig = {