feat(modules): new emulationstation desktop edition module base

This commit is contained in:
Malte Tammena 2024-01-06 15:01:14 +01:00
parent 4dbdd6794d
commit be6cd3ae07
2 changed files with 38 additions and 0 deletions

View file

@ -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;

View file

@ -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;
};
}