103 lines
3.8 KiB
Nix
103 lines
3.8 KiB
Nix
{ 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 = [(
|
|
pkgs.retroarch.override {
|
|
cores = with pkgs.libretro; [
|
|
snes9x
|
|
];
|
|
settings = {
|
|
video_driver = "vulkan";
|
|
video_fullscreen = "true";
|
|
menu_swap_ok_cancel_buttons = "true";
|
|
input_joypad_driver = "sdl2";
|
|
# Enable touchscreen support
|
|
menu_pointer_enable = "true";
|
|
|
|
# Folder stuffs
|
|
|
|
# System/BIOS files
|
|
system_directory = "~/.local/share/retroarch/system";
|
|
# Downloads
|
|
core_assets_directory = "~/.local/share/retroarch/downloads";
|
|
thumbnails_directory = "~/.local/share/retroarch/thumbnails";
|
|
content_database_path = "~/.local/share/retroarch/database/rdb";
|
|
cheat_database_path = "~/.local/share/retroarch/cheats";
|
|
video_filter_dir = "~/.local/share/retroarch/filters/video";
|
|
audio_filter_dir = "~/.local/share/retroarch/filters/audio";
|
|
video_shader_dir = "~/.local/share/retroarch/shaders";
|
|
recording_output_directory = "~/.local/share/retroarch/records";
|
|
overlay_directory = "~/.local/share/retroarch/overlays";
|
|
osk_overlay_directory = "~/.local/share/retroarch/overlays/keyboards";
|
|
screenshot_directory = "~/.local/share/retroarch/screenshots";
|
|
playlist_directory = "~/.local/share/retroarch/playlists";
|
|
savefile_directory = "~/.local/share/retroarch/saves";
|
|
savestate_directory = "~/.local/share/retroarch/states";
|
|
log_dir = "~/.local/share/retroarch/logs";
|
|
|
|
# By default settings has some things that this overrides, so I need to set them myself
|
|
libretro_info_path = "${pkgs.libretro-core-info}/share/retroarch/cores";
|
|
joypad_autoconfig_dir = "${pkgs.retroarch-joypad-autoconfig}/share/libretro/autoconfig";
|
|
assets_directory = "${pkgs.retroarch-assets}/share/retroarch/assets";
|
|
};
|
|
}
|
|
)];
|
|
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 this folder (but it does for others)
|
|
systemd.user.tmpfiles.rules = [ "d /%h/.local/share/retroarch/playlists" ];
|
|
# Add a syncthing ignore file to the retroarch folder
|
|
xdg.configFile."retroarch-stignore" = {
|
|
enable = false;
|
|
target = "retroarch/.stignore";
|
|
text = ''
|
|
!saves
|
|
!states
|
|
!database
|
|
!playlists
|
|
|
|
// Ignore everything except stuff above
|
|
*
|
|
'';
|
|
};
|
|
};
|
|
|
|
# Sync saves and some other stuff
|
|
services.syncthing.settings.folders = {
|
|
"retroarch" = {
|
|
enable = false;
|
|
label = "RetroArch";
|
|
id = "jxuou-2yjnu";
|
|
devices = [ "steamdeck" "pc" ];
|
|
path = "~/.config/retroarch";
|
|
};
|
|
};
|
|
}
|