Add rpcs3 (PS3 emulator) to steam deck.
This commit is contained in:
parent
acfc9ac1a4
commit
44a49d7ac7
@ -10,6 +10,7 @@
|
||||
./roles/2ship2harkinian
|
||||
./roles/graphics
|
||||
./roles/pcsx2
|
||||
./roles/rpcs3
|
||||
./roles/shipwright
|
||||
./roles/sm64ex
|
||||
./roles/steam_rom_manager
|
||||
|
@ -11,6 +11,7 @@
|
||||
config = {
|
||||
me.graphical = true;
|
||||
me.pcsx2.enable = true;
|
||||
me.rpcs3.enable = true;
|
||||
me.ship2harkinian.enable = true;
|
||||
me.shipwright.enable = true;
|
||||
me.sm64ex.enable = true;
|
||||
|
94
nix/steam_deck/configuration/roles/rpcs3/default.nix
Normal file
94
nix/steam_deck/configuration/roles/rpcs3/default.nix
Normal file
@ -0,0 +1,94 @@
|
||||
# MANUAL: mkdir -p ~/.state/.cache/rpcs3 ~/.persist/.config/rpcs3/dev_hdd0 ~/.persist/.config/rpcs3/dev_hdd1 ~/.persist/.config/rpcs3/savestates ~/.persist/.config/rpcs3/dev_usb000 ~/.persist/.config/rpcs3/dev_flash
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
steam_rpcs3 = pkgs.writeScriptBin "steam_rpcs3" ''
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib"
|
||||
exec ${pkgs.rpcs3}/bin/rpcs3
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
rpcs3.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install rpcs3.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.rpcs3.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf config.me.graphical {
|
||||
home.packages = with pkgs; [
|
||||
rpcs3
|
||||
steam_rpcs3
|
||||
];
|
||||
|
||||
# .config/rpcs3/config.yml
|
||||
# .config/rpcs3/GuiConfigs/CurrentSettings.ini
|
||||
|
||||
home.persistence."/home/deck/.persist" = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".config/rpcs3/dev_hdd0";
|
||||
method = "symlink";
|
||||
}
|
||||
{
|
||||
directory = ".config/rpcs3/dev_hdd1";
|
||||
method = "symlink";
|
||||
}
|
||||
{
|
||||
directory = ".config/rpcs3/savestates";
|
||||
method = "symlink";
|
||||
}
|
||||
{
|
||||
directory = ".config/rpcs3/dev_usb000";
|
||||
method = "symlink";
|
||||
}
|
||||
{
|
||||
# Seems to be where the firmware is installed.
|
||||
directory = ".config/rpcs3/dev_flash";
|
||||
method = "symlink";
|
||||
}
|
||||
];
|
||||
};
|
||||
home.persistence."/home/deck/.state" = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".cache/rpcs3";
|
||||
method = "symlink";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
rpcs3 = pkgs.buildEnv {
|
||||
name = prev.rpcs3.name;
|
||||
paths = [
|
||||
(config.lib.nixGL.wrap prev.rpcs3)
|
||||
];
|
||||
extraOutputsToInstall = [
|
||||
"man"
|
||||
"doc"
|
||||
"info"
|
||||
];
|
||||
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
|
||||
# postBuild = ''
|
||||
# chmod 0555 $out/share/applications/PCSX2.desktop
|
||||
# '';
|
||||
};
|
||||
})
|
||||
];
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user