77 lines
1.3 KiB
Nix
77 lines
1.3 KiB
Nix
{ 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 }: ''
|
|
<system>
|
|
<name>${name}</name>
|
|
<fullname>${name}</fullname>
|
|
<path>${romspath}/${name}</path>
|
|
<extension>.zip .nes .cue .rvz</extension>
|
|
<command>bash %ROM%</command>
|
|
<platform>snes</platform>
|
|
<theme>${theme}</theme>
|
|
</system>
|
|
'';
|
|
|
|
systems = themes:
|
|
let
|
|
list = builtins.foldl' (global: theme: global + (system theme)) "" themes;
|
|
in ''
|
|
<?xml version="1.0"?>
|
|
<systemList>
|
|
${list}
|
|
</systemList>
|
|
'';
|
|
|
|
in {
|
|
environment.etc = {
|
|
"emulationstation/themes/hackens" = {
|
|
source = ./theme;
|
|
mode = "0755";
|
|
};
|
|
"emulationstation/es_systems.cfg" = {
|
|
text = systems themes;
|
|
mode = "0644";
|
|
};
|
|
};
|
|
}
|