31 lines
743 B
Nix
31 lines
743 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}: let
|
|
cfg = config.programs.emulationstation-de;
|
|
in {
|
|
imports = [
|
|
./steam.nix
|
|
];
|
|
|
|
options.programs.emulationstation-de = with lib; {
|
|
enable = mkEnableOption "EmulationStation Desktop Edition, a frontend for browsing and launching games from your multi-platform game collection";
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = pkgs.emulationstation-de;
|
|
};
|
|
nintendo.enable = mkEnableOption "Nintendo emulation support using melonDS";
|
|
};
|
|
|
|
config = let
|
|
packages = [cfg.package] ++ (lib.optional cfg.nintendo.enable pkgs.melonDS);
|
|
in
|
|
lib.mkIf cfg.enable {
|
|
environment.systemPackages = packages;
|
|
|
|
programs.steam.extraPkgs = packages;
|
|
};
|
|
}
|