{ userhome, ... }:
let
romspath = "${userhome}/roms";
themes = [
{
name = "Arcade";
theme = "arcade";
}
{
name = "BeatThemAll";
theme = "btmups";
}
{
name = "BestJeuEver";
theme = "bestjeuever";
}
{
name = "Course";
theme = "racing";
}
{
name = "Kombat";
theme = "kombat";
}
{
name = "Plateforme";
theme = "plateforme";
}
{
name = "Shmup";
theme = "shmups";
}
{
name = "Sport";
theme = "sports";
}
{
name = "Versus";
theme = "versus";
}
];
system = { name, theme }: ''
${name}
${name}
${romspath}/${name}
.zip .nes .cue .rvz
bash %ROM%
snes
${theme}
'';
systems = themes:
let
list = builtins.foldl' (global: theme: global + (system theme)) "" themes;
in ''
${list}
'';
in {
environment.etc = {
"emulationstation/themes/hackens" = {
source = ./theme;
mode = "0755";
};
"emulationstation/es_systems.cfg" = {
text = systems themes;
mode = "0644";
};
};
}