add themes
This commit is contained in:
parent
2aa1156a25
commit
9f8994f4d2
2 changed files with 21 additions and 2 deletions
10
games.nix
10
games.nix
|
@ -9,7 +9,7 @@ in
|
|||
{
|
||||
retronix = {
|
||||
systems = {
|
||||
"Arcade" = {
|
||||
"arcade" = {
|
||||
extension = ".sh";
|
||||
games = with pkgs.roms; mapRetroarchConfig {} [
|
||||
atetris
|
||||
|
@ -24,6 +24,14 @@ in
|
|||
emulationstation = {
|
||||
inputCfgFile = mkFile "es_input.cfg" ./es_input.cfg;
|
||||
settingsCfgFile = mkFile "es_settings.cfg" ./es_settings.cfg;
|
||||
themes = {
|
||||
"ComicBook" = pkgs.fetchFromGitHub {
|
||||
owner = "TMNTturtleguy";
|
||||
repo = "es-theme-ComicBook";
|
||||
rev = "master";
|
||||
hash = "sha256-Mma7/5osIvTdTM8Z0vkJBW/4p3O6wms6nBApxB7+IiA=";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -121,6 +121,10 @@ in {
|
|||
themesDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
};
|
||||
themes = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.path;
|
||||
default = {};
|
||||
};
|
||||
inputCfg = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
|
@ -157,6 +161,12 @@ in {
|
|||
</systemList>
|
||||
'';
|
||||
inputCfgFile = lib.mkDefault (pkgs.writeTextDir "es_input.cfg" cfg.inputCfg);
|
||||
themesDir = let
|
||||
copyCommands = lib.concatLines (lib.mapAttrsToList (k: v: "cp -r ${v} $out/themes/${k}") cfg.themes);
|
||||
in pkgs.runCommand "es-themes" {} ''
|
||||
mkdir -p $out/themes
|
||||
${copyCommands}
|
||||
'';
|
||||
homeDir = pkgs.symlinkJoinSubdir {
|
||||
name = "es-config-dir";
|
||||
subdir = ".emulationstation";
|
||||
|
@ -164,6 +174,7 @@ in {
|
|||
cfg.systemCfgFile
|
||||
cfg.inputCfgFile
|
||||
cfg.settingsCfgFile
|
||||
cfg.themesDir
|
||||
] ++ cfg.extraConfigFiles;
|
||||
};
|
||||
cli = pkgs.writeScript "emulationstation" "${pkgs.emulationstationPatched}/bin/emulationstation --home ${cfg.homeDir} --gamelist-only";
|
||||
|
|
Loading…
Reference in a new issue