{ config, lib, pkgs, ... }: let cfg = config.modules.desktop.gaming.emulators; in { options.modules.desktop.gaming.emulators = { ds.enable = lib.mkOption { default = false; example = true; }; gb.enable = lib.mkOption { default = false; example = true; }; gba.enable = lib.mkOption { default = false; example = true; }; gamecube.enable = lib.mkOption { default = false; example = true; }; ps2.enable = lib.mkOption { default = false; example = true; }; ps3.enable = lib.mkOption { default = false; example = true; }; psp.enable = lib.mkOption { default = false; example = true; }; snes.enable = lib.mkOption { default = false; example = true; }; wii.enable = lib.mkOption { default = false; example = true; }; }; config = { user.packages = with pkgs; [ (lib.mkIf cfg.ps2.enable pcsx2) (lib.mkIf cfg.ps3.enable rpcs3) (lib.mkIf cfg.psp.enable ppsspp) (lib.mkIf cfg.ds.enable desmume) (lib.mkIf (cfg.gba.enable || cfg.gb.enable || cfg.snes.enable) higan) (lib.mkIf (cfg.wii.enable || cfg.gamecube.enable) dolphin-emu) ]; }; }