diff --git a/modules/deck.nix b/modules/deck.nix index 4f025a6..b50c81d 100644 --- a/modules/deck.nix +++ b/modules/deck.nix @@ -7,6 +7,10 @@ }: let cfg = config.users.custom.deck; in { + imports = [ + ../modules/emulationstation-de.nix + ]; + options.users.custom.deck = with lib; { enable = mkEnableOption "user 'deck' on this machine"; }; @@ -49,6 +53,10 @@ in { programs.fish.enable = true; services.flatpak.enable = true; + programs.emulationstation-de = { + enable = true; + nintendo.enable = true; + }; # programs.hyprland = { # enable = true; diff --git a/modules/emulationstation-de.nix b/modules/emulationstation-de.nix new file mode 100644 index 0000000..8b6ab47 --- /dev/null +++ b/modules/emulationstation-de.nix @@ -0,0 +1,30 @@ +{ + 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; + }; +}