133 lines
4.3 KiB
Nix
133 lines
4.3 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
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
|
|
];
|
|
xdg.configFile = {
|
|
#PCSX2 silently overwrites the symlink so I need to force it's creation
|
|
"PCSX2/inis/PCSX2.ini".force = true;
|
|
"PCSX2/inis/PCSX2.ini".text =
|
|
lib.generators.toINI {
|
|
listsAsDuplicateKeys = true;
|
|
} {
|
|
UI = {
|
|
SettingsVersion = 1;
|
|
# Use the system theme
|
|
Theme = "";
|
|
HideMouseCursor = true;
|
|
};
|
|
Folders = {
|
|
Bios = "/home/toast/.local/share/PCSX2/bios";
|
|
};
|
|
GameList.RecursivePaths = [
|
|
"/home/toast/Games/Isos/PS2/"
|
|
];
|
|
"EmuCore/GS" = {
|
|
dithering_ps2 = 1;
|
|
upscale_multiplier = 2;
|
|
};
|
|
EmuCore = {
|
|
EnableDiscordPresence = true;
|
|
EnableFastBoot = true;
|
|
McdFolderAutoManage = false;
|
|
};
|
|
|
|
MemoryCards.Slot1_Filename = "MemoryCard1.ps2";
|
|
|
|
# Controller settings
|
|
Pad1 = {
|
|
Up = "SDL-0/DPadUp";
|
|
Right = "SDL-0/DPadRight";
|
|
Down = "SDL-0/DPadDown";
|
|
Left = "SDL-0/DPadLeft";
|
|
Triangle = "SDL-0/Y";
|
|
Circle = "SDL-0/B";
|
|
Cross = "SDL-0/A";
|
|
Square = "SDL-0/X";
|
|
Select = "SDL-0/Back";
|
|
Start = "SDL-0/Start";
|
|
L1 = "SDL-0/LeftShoulder";
|
|
L2 = "SDL-0/+LeftTrigger";
|
|
R1 = "SDL-0/RightShoulder";
|
|
R2 = "SDL-0/+RightTrigger";
|
|
L3 = "SDL-0/LeftStick";
|
|
R3 = "SDL-0/RightStick";
|
|
Analog = "SDL-0/Guide";
|
|
LUp = "SDL-0/-LeftY";
|
|
LRight = "SDL-0/+LeftX";
|
|
LDown = "SDL-0/+LeftY";
|
|
LLeft = "SDL-0/-LeftX";
|
|
RUp = "SDL-0/-RightY";
|
|
RRight = "SDL-0/+RightX";
|
|
RDown = "SDL-0/+RightY";
|
|
RLeft = "SDL-0/-RightX";
|
|
LargeMotor = "SDL-0/LargeMotor";
|
|
SmallMotor = "SDL-0/SmallMotor";
|
|
};
|
|
# Default hotkeys
|
|
Hotkeys = {
|
|
ToggleFullscreen = "Keyboard/Alt & Keyboard/Return";
|
|
CycleAspectRatio = "Keyboard/F6";
|
|
CycleInterlaceMode = "Keyboard/F5";
|
|
CycleMipmapMode = "Keyboard/Insert";
|
|
GSDumpMultiFrame = "Keyboard/Control & Keyboard/Shift & Keyboard/F8";
|
|
Screenshot = "Keyboard/F8";
|
|
GSDumpSingleFrame = "Keyboard/Shift & Keyboard/F8";
|
|
ToggleSoftwareRendering = "Keyboard/F9";
|
|
ZoomIn = "Keyboard/Control & Keyboard/Plus";
|
|
ZoomOut = "Keyboard/Control & Keyboard/Minus";
|
|
InputRecToggleMode = "Keyboard/Shift & Keyboard/R";
|
|
LoadStateFromSlot = "Keyboard/F3";
|
|
SaveStateToSlot = "Keyboard/F1";
|
|
NextSaveStateSlot = "Keyboard/F2";
|
|
PreviousSaveStateSlot = "Keyboard/Shift & Keyboard/F2";
|
|
OpenPauseMenu = "Keyboard/Escape";
|
|
ToggleFrameLimit = "Keyboard/F4";
|
|
TogglePause = "Keyboard/Space";
|
|
ToggleSlowMotion = "Keyboard/Shift & Keyboard/Backtab";
|
|
ToggleTurbo = "Keyboard/Tab";
|
|
HoldTurbo = "Keyboard/Period";
|
|
};
|
|
};
|
|
# 007 nightfire
|
|
"PCSX2/gamesettings/SLUS-20579_5B86BB62.ini".text = lib.generators.toINI {} {
|
|
"EmuCore/GS".AspectRatio = "16:9";
|
|
};
|
|
};
|
|
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
|
|
'';
|
|
};
|
|
};
|
|
|
|
# Syncthing
|
|
services.syncthing.settings.folders."pcsx2" = {
|
|
label = "PCSX2";
|
|
id = "qcdsp-qaaej";
|
|
devices = ["steamdeck" "server" "pc" "winmax2"];
|
|
path = "~/.config/PCSX2";
|
|
};
|
|
home-manager.users.toast.xdg.configFile = {
|
|
"PCSX2/.stignore".text = ''
|
|
cache
|
|
bios
|
|
gamesettings
|
|
inis/PCSX2.ini*
|
|
inis/debuggersettings
|
|
inputprofiles
|
|
logs
|
|
'';
|
|
};
|
|
}
|