Add support for yuzu and ryujinx.
This commit is contained in:
parent
812a762652
commit
fc47359184
@ -14,11 +14,14 @@
|
||||
./roles/graphics
|
||||
./roles/pcsx2
|
||||
./roles/rpcs3
|
||||
./roles/ryujinx
|
||||
./roles/shipwright
|
||||
./roles/sm64ex
|
||||
./roles/steam_rom_manager
|
||||
./util/unfree_polyfill
|
||||
./roles/yuzu
|
||||
./util/copy_files
|
||||
./util/persist_symlink
|
||||
./util/unfree_polyfill
|
||||
];
|
||||
|
||||
home.username = "deck";
|
||||
|
@ -15,9 +15,11 @@
|
||||
me.optimizations.enable = true;
|
||||
me.pcsx2.enable = true;
|
||||
me.rpcs3.enable = true;
|
||||
me.ryujinx.enable = true;
|
||||
me.ship2harkinian.enable = true;
|
||||
me.shipwright.enable = true;
|
||||
me.sm64ex.enable = true;
|
||||
me.steam_rom_manager.enable = true; # Steam rom manager UI does not render. I think it wants to be in an AppImage.
|
||||
me.yuzu.enable = true;
|
||||
};
|
||||
}
|
||||
|
39
nix/steam_deck/configuration/roles/ryujinx/default.nix
Normal file
39
nix/steam_deck/configuration/roles/ryujinx/default.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
ryujinx.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install ryujinx.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.ryujinx.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf config.me.graphical {
|
||||
# This needs to be read-write so we use me.copy.file to copy the file.
|
||||
me.copy.file.".config/Ryujinx/Config.json" = {
|
||||
source = ./files/Config.json;
|
||||
mode = "0644";
|
||||
};
|
||||
|
||||
me.persist.directories = [
|
||||
".config/Ryujinx/bis"
|
||||
".config/Ryujinx/games"
|
||||
".config/Ryujinx/sdcard"
|
||||
".config/Ryujinx/system"
|
||||
];
|
||||
me.state.directories = [ ];
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
174
nix/steam_deck/configuration/roles/ryujinx/files/Config.json
Normal file
174
nix/steam_deck/configuration/roles/ryujinx/files/Config.json
Normal file
@ -0,0 +1,174 @@
|
||||
{
|
||||
"version": 51,
|
||||
"enable_file_log": true,
|
||||
"backend_threading": "Auto",
|
||||
"res_scale": 1,
|
||||
"res_scale_custom": 1,
|
||||
"max_anisotropy": -1,
|
||||
"aspect_ratio": "Fixed16x9",
|
||||
"anti_aliasing": "None",
|
||||
"scaling_filter": "Bilinear",
|
||||
"scaling_filter_level": 80,
|
||||
"graphics_shaders_dump_path": "",
|
||||
"logging_enable_debug": false,
|
||||
"logging_enable_stub": true,
|
||||
"logging_enable_info": true,
|
||||
"logging_enable_warn": true,
|
||||
"logging_enable_error": true,
|
||||
"logging_enable_trace": false,
|
||||
"logging_enable_guest": true,
|
||||
"logging_enable_fs_access_log": false,
|
||||
"logging_filtered_classes": [],
|
||||
"logging_graphics_debug_level": "None",
|
||||
"system_language": "AmericanEnglish",
|
||||
"system_region": "USA",
|
||||
"system_time_zone": "UTC",
|
||||
"system_time_offset": -187,
|
||||
"docked_mode": true,
|
||||
"enable_discord_integration": false,
|
||||
"check_updates_on_start": false,
|
||||
"show_confirm_exit": false,
|
||||
"remember_window_state": true,
|
||||
"enable_hardware_acceleration": true,
|
||||
"hide_cursor": 1,
|
||||
"enable_vsync": true,
|
||||
"enable_shader_cache": true,
|
||||
"enable_texture_recompression": false,
|
||||
"enable_macro_hle": true,
|
||||
"enable_color_space_passthrough": false,
|
||||
"enable_ptc": true,
|
||||
"enable_internet_access": false,
|
||||
"enable_fs_integrity_checks": true,
|
||||
"fs_global_access_log_mode": 0,
|
||||
"audio_backend": "SDL2",
|
||||
"audio_volume": 1,
|
||||
"memory_manager_mode": "HostMappedUnsafe",
|
||||
"expand_ram": false,
|
||||
"ignore_missing_services": false,
|
||||
"gui_columns": {
|
||||
"fav_column": true,
|
||||
"icon_column": true,
|
||||
"app_column": true,
|
||||
"dev_column": true,
|
||||
"version_column": true,
|
||||
"time_played_column": true,
|
||||
"last_played_column": true,
|
||||
"file_ext_column": true,
|
||||
"file_size_column": true,
|
||||
"path_column": true
|
||||
},
|
||||
"column_sort": {
|
||||
"sort_column_id": 0,
|
||||
"sort_ascending": false
|
||||
},
|
||||
"game_dirs": [
|
||||
"/home/deck/.persist/manual/games/nintendo_switch/roms/ryujinx"
|
||||
],
|
||||
"shown_file_types": {
|
||||
"nsp": true,
|
||||
"pfs0": true,
|
||||
"xci": true,
|
||||
"nca": true,
|
||||
"nro": true,
|
||||
"nso": true
|
||||
},
|
||||
"window_startup": {
|
||||
"window_size_width": 1280,
|
||||
"window_size_height": 800,
|
||||
"window_position_x": 0,
|
||||
"window_position_y": 0,
|
||||
"window_maximized": false
|
||||
},
|
||||
"language_code": "en_US",
|
||||
"enable_custom_theme": true,
|
||||
"custom_theme_path": "",
|
||||
"base_style": "Dark",
|
||||
"game_list_view_mode": 0,
|
||||
"show_names": true,
|
||||
"grid_size": 2,
|
||||
"application_sort": 0,
|
||||
"is_ascending_order": true,
|
||||
"start_fullscreen": false,
|
||||
"show_console": true,
|
||||
"enable_keyboard": false,
|
||||
"enable_mouse": false,
|
||||
"hotkeys": {
|
||||
"toggle_vsync": "F1",
|
||||
"screenshot": "F8",
|
||||
"show_ui": "F4",
|
||||
"pause": "F5",
|
||||
"toggle_mute": "F2",
|
||||
"res_scale_up": "Unbound",
|
||||
"res_scale_down": "Unbound",
|
||||
"volume_up": "Unbound",
|
||||
"volume_down": "Unbound"
|
||||
},
|
||||
"keyboard_config": [],
|
||||
"controller_config": [],
|
||||
"input_config": [
|
||||
{
|
||||
"left_joycon_stick": {
|
||||
"joystick": "Left",
|
||||
"invert_stick_x": false,
|
||||
"invert_stick_y": false,
|
||||
"rotate90_cw": false,
|
||||
"stick_button": "LeftStick"
|
||||
},
|
||||
"right_joycon_stick": {
|
||||
"joystick": "Right",
|
||||
"invert_stick_x": false,
|
||||
"invert_stick_y": false,
|
||||
"rotate90_cw": false,
|
||||
"stick_button": "RightStick"
|
||||
},
|
||||
"deadzone_left": 0.1,
|
||||
"deadzone_right": 0.1,
|
||||
"range_left": 1,
|
||||
"range_right": 1,
|
||||
"trigger_threshold": 0.5,
|
||||
"motion": {
|
||||
"motion_backend": "GamepadDriver",
|
||||
"sensitivity": 100,
|
||||
"gyro_deadzone": 1,
|
||||
"enable_motion": true
|
||||
},
|
||||
"rumble": {
|
||||
"strong_rumble": 1,
|
||||
"weak_rumble": 1,
|
||||
"enable_rumble": true
|
||||
},
|
||||
"left_joycon": {
|
||||
"button_minus": "Back",
|
||||
"button_l": "LeftShoulder",
|
||||
"button_zl": "LeftTrigger",
|
||||
"button_sl": "Unbound",
|
||||
"button_sr": "Unbound",
|
||||
"dpad_up": "DpadUp",
|
||||
"dpad_down": "DpadDown",
|
||||
"dpad_left": "DpadLeft",
|
||||
"dpad_right": "DpadRight"
|
||||
},
|
||||
"right_joycon": {
|
||||
"button_plus": "Start",
|
||||
"button_r": "RightShoulder",
|
||||
"button_zr": "RightTrigger",
|
||||
"button_sl": "Unbound",
|
||||
"button_sr": "Unbound",
|
||||
"button_x": "X",
|
||||
"button_b": "B",
|
||||
"button_y": "Y",
|
||||
"button_a": "A"
|
||||
},
|
||||
"version": 1,
|
||||
"backend": "GamepadSDL2",
|
||||
"id": "0-f6790003-28de-0000-ff11-000001000000",
|
||||
"controller_type": "ProController",
|
||||
"player_index": "Player1"
|
||||
}
|
||||
],
|
||||
"graphics_backend": "Vulkan",
|
||||
"preferred_gpu": "0x1002_0x163F",
|
||||
"multiplayer_mode": 0,
|
||||
"multiplayer_lan_interface_id": "0",
|
||||
"use_hypervisor": true
|
||||
}
|
41
nix/steam_deck/configuration/roles/yuzu/default.nix
Normal file
41
nix/steam_deck/configuration/roles/yuzu/default.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
yuzu.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install yuzu.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.yuzu.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf config.me.graphical {
|
||||
home.file.".config/yuzu/qt-config.ini" = {
|
||||
source = ./files/qt-config.ini;
|
||||
};
|
||||
home.file.".config/yuzu/input/deck.ini" = {
|
||||
source = ./files/deck.ini;
|
||||
};
|
||||
|
||||
me.persist.directories = [
|
||||
".local/share/yuzu/nand"
|
||||
".local/share/yuzu/sdmc" # SD Card
|
||||
".local/share/yuzu/screenshots"
|
||||
".local/share/yuzu/keys"
|
||||
".config/yuzu/custom" # Per-game configs
|
||||
];
|
||||
me.state.directories = [ ".local/share/yuzu/shader" ];
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
55
nix/steam_deck/configuration/roles/yuzu/files/deck.ini
Normal file
55
nix/steam_deck/configuration/roles/yuzu/files/deck.ini
Normal file
@ -0,0 +1,55 @@
|
||||
[Controls]
|
||||
type\default=true
|
||||
type=0
|
||||
button_a\default=false
|
||||
button_a="pad:0,button:0,port:0,guid:03000000de280000ff11000001000000,engine:sdl"
|
||||
button_b\default=false
|
||||
button_b="pad:0,button:1,port:0,guid:03000000de280000ff11000001000000,engine:sdl"
|
||||
button_x\default=false
|
||||
button_x="pad:0,button:2,port:0,guid:03000000de280000ff11000001000000,engine:sdl"
|
||||
button_y\default=false
|
||||
button_y="pad:0,button:3,port:0,guid:03000000de280000ff11000001000000,engine:sdl"
|
||||
button_lstick\default=false
|
||||
button_lstick="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:9"
|
||||
button_rstick\default=false
|
||||
button_rstick="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:10"
|
||||
button_l\default=false
|
||||
button_l="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:4"
|
||||
button_r\default=false
|
||||
button_r="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:5"
|
||||
button_zl\default=false
|
||||
button_zl="engine:sdl,invert:+,port:0,guid:03000000de280000ff11000001000000,axis:2,threshold:0.500000"
|
||||
button_zr\default=false
|
||||
button_zr="engine:sdl,invert:+,port:0,guid:03000000de280000ff11000001000000,axis:5,threshold:0.500000"
|
||||
button_plus\default=false
|
||||
button_plus="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:7"
|
||||
button_minus\default=false
|
||||
button_minus="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:6"
|
||||
button_dleft\default=false
|
||||
button_dleft="engine:sdl,port:0,guid:03000000de280000ff11000001000000,direction:left,hat:0"
|
||||
button_dup\default=false
|
||||
button_dup="engine:sdl,port:0,guid:03000000de280000ff11000001000000,direction:up,hat:0"
|
||||
button_dright\default=false
|
||||
button_dright="engine:sdl,port:0,guid:03000000de280000ff11000001000000,direction:right,hat:0"
|
||||
button_ddown\default=false
|
||||
button_ddown="engine:sdl,port:0,guid:03000000de280000ff11000001000000,direction:down,hat:0"
|
||||
button_slleft\default=false
|
||||
button_slleft="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:4"
|
||||
button_srleft\default=false
|
||||
button_srleft="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:5"
|
||||
button_home\default=false
|
||||
button_home="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:8"
|
||||
button_screenshot\default=false
|
||||
button_screenshot=[empty]
|
||||
button_slright\default=false
|
||||
button_slright="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:4"
|
||||
button_srright\default=false
|
||||
button_srright="engine:sdl,port:0,guid:03000000de280000ff11000001000000,button:5"
|
||||
lstick\default=false
|
||||
lstick="deadzone:0.150000,engine:sdl,port:0,guid:03000000de280000ff11000001000000,axis_x:0,offset_x:-0.001556,axis_y:1,offset_y:-0.013184,invert_x:+,invert_y:+"
|
||||
rstick\default=false
|
||||
rstick="deadzone:0.150000,engine:sdl,port:0,guid:03000000de280000ff11000001000000,axis_x:3,offset_x:-0.001190,axis_y:4,offset_y:-0.010468,invert_x:+,invert_y:+"
|
||||
motionleft\default=false
|
||||
motionleft=[empty]
|
||||
motionright\default=false
|
||||
motionright=[empty]
|
1442
nix/steam_deck/configuration/roles/yuzu/files/qt-config.ini
Normal file
1442
nix/steam_deck/configuration/roles/yuzu/files/qt-config.ini
Normal file
File diff suppressed because it is too large
Load Diff
101
nix/steam_deck/configuration/util/copy_files/default.nix
Normal file
101
nix/steam_deck/configuration/util/copy_files/default.nix
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
filter
|
||||
attrNames
|
||||
;
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
copy.file = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, config, ... }:
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
defaultText = "me.copy.file.‹name›.enable";
|
||||
example = false;
|
||||
description = "Whether we want to copy this file.";
|
||||
};
|
||||
mode = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "0444";
|
||||
defaultText = "me.copy.file.‹name›.mode";
|
||||
example = "0750";
|
||||
description = "The read, write, execute permission flags.";
|
||||
};
|
||||
source = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
defaultText = "me.copy.file.‹name›.source";
|
||||
example = ./files/foo.txt;
|
||||
description = "The source file to copy into the destination.";
|
||||
};
|
||||
target = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
defaultText = "me.copy.file.‹name›.target";
|
||||
example = ".local/share/foo/bar.txt";
|
||||
description = "The path where the file should be written.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
target = lib.mkDefault name;
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
defaultText = "me.copy.file.‹name›";
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
".config/foo/bar.txt" = {
|
||||
source = ./files/bar.txt
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (config.me.copy.file != { }) (
|
||||
let
|
||||
cfg = config.me.copy.file;
|
||||
copy_file_targets = filter (target: config.me.copy.file."${target}".enable) (attrNames cfg);
|
||||
in
|
||||
{
|
||||
home.activation = {
|
||||
copyFiles = home-manager.lib.hm.dag.entryAfter [ "writeBoundary" ] (
|
||||
let
|
||||
copy_commands = builtins.map (
|
||||
target:
|
||||
let
|
||||
target_config = config.me.copy.file."${target}";
|
||||
source = lib.strings.escapeShellArg "${target_config.source}";
|
||||
destination = lib.strings.escapeShellArg target;
|
||||
mode = lib.strings.escapeShellArg "${target_config.mode}";
|
||||
in
|
||||
# $DRY_RUN_CMD ${pkgs.toyboy}/bin/install $VERBOSE_ARG -D -m ${mode} ${source} ${destination}
|
||||
''
|
||||
$DRY_RUN_CMD install $VERBOSE_ARG -D --compare -m ${mode} ${source} ${destination}
|
||||
''
|
||||
) copy_file_targets;
|
||||
in
|
||||
(lib.strings.concatStringsSep "\n" copy_commands)
|
||||
);
|
||||
};
|
||||
}
|
||||
))
|
||||
];
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user