retronix/games.nix
2024-01-17 13:37:05 +01:00

29 lines
627 B
Nix

{ lib, config, pkgs, ...}:
let
inherit (config.retronix.retroarch) mapRetroarchConfig;
mkFile = name: path: pkgs.runCommand name {} ''
mkdir -p $out
cp ${path} $out/${name}
'';
in
{
retronix = {
systems = {
"Arcade" = {
extension = ".sh";
games = with pkgs.roms; mapRetroarchConfig {} [
atetris
dkong
mario
neopong
pacman
spacedx
];
};
};
emulationstation = {
inputCfgFile = mkFile "es_input.cfg" ./es_input.cfg;
settingsCfgFile = mkFile "es_settings.cfg" ./es_settings.cfg;
};
};
}