1 { config, lib, pkgs, ... }:
5 let cfg = config.services.xserver.desktopManager.retroarch;
8 options.services.xserver.desktopManager.retroarch = {
9 enable = mkEnableOption (lib.mdDoc "RetroArch");
13 default = pkgs.retroarch;
14 defaultText = literalExpression "pkgs.retroarch";
15 example = literalExpression "pkgs.retroarch-full";
16 description = lib.mdDoc "RetroArch package to use.";
19 extraArgs = mkOption {
20 type = types.listOf types.str;
22 example = [ "--verbose" "--host" ];
23 description = lib.mdDoc "Extra arguments to pass to RetroArch.";
27 config = mkIf cfg.enable {
28 services.xserver.desktopManager.session = [{
31 ${cfg.package}/bin/retroarch -f ${escapeShellArgs cfg.extraArgs} &
36 environment.systemPackages = [ cfg.package ];
39 meta.maintainers = with maintainers; [ j0hax ];