77 lines
2.4 KiB
Nix
77 lines
2.4 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";
|
|
|
|
# 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 ];
|
|
};
|
|
};
|
|
};
|
|
# 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";
|
|
};
|
|
};
|
|
}
|