1 { config, lib, pkgs, ... }:
5 let cfg = config.services.xserver.desktopManager.retroarch;
8 options.services.xserver.desktopManager.retroarch = {
9 enable = mkEnableOption "RetroArch";
11 package = mkPackageOption pkgs "retroarch" {
12 example = "retroarch-full";
15 extraArgs = mkOption {
16 type = types.listOf types.str;
18 example = [ "--verbose" "--host" ];
19 description = "Extra arguments to pass to RetroArch.";
23 config = mkIf cfg.enable {
24 services.xserver.desktopManager.session = [{
27 ${cfg.package}/bin/retroarch -f ${escapeShellArgs cfg.extraArgs} &
32 environment.systemPackages = [ cfg.package ];
35 meta.maintainers = with maintainers; [ j0hax ];