From 8f723d613588e4a55e8838197741727e4dea4944 Mon Sep 17 00:00:00 2001 From: B1kku <77858854+B1kku@users.noreply.github.com> Date: Fri, 9 May 2025 13:21:19 +0000 Subject: [PATCH] lutris: fix runners not working due to wrong config name (#7008) --- modules/programs/lutris.nix | 16 ++++++++-------- .../programs/lutris/runners-configuration.nix | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/programs/lutris.nix b/modules/programs/lutris.nix index 1ddf8d9a..991b5e7c 100644 --- a/modules/programs/lutris.nix +++ b/modules/programs/lutris.nix @@ -75,7 +75,7 @@ in cemu.package = pkgs.cemu; pcsx2.config = { system.disable_screen_saver = true; - runner.executable_path = "$\{pkgs.pcsx2}/bin/pcsx2-qt"; + runner.runner_executable = "$\{pkgs.pcsx2}/bin/pcsx2-qt"; }; }; ''; @@ -92,7 +92,7 @@ in example = "pkgs.cemu"; description = '' The package to use for this runner, nix will try to find the executable for this package. - A more specific path can be set by using settings.runner.executable_path instead. + A more specific path can be set by using settings.runner.runner_executable instead. ''; type = types.nullOr types.package; }; @@ -112,7 +112,7 @@ in type = types.submodule { freeformType = settingsFormat.type; options = { - executable_path = mkOption { + runner_executable = mkOption { type = types.either types.str types.path; default = ""; description = '' @@ -149,16 +149,16 @@ in redundantRunners = attrNames ( filterAttrs ( _: runner_config: - runner_config.package != null && runner_config.settings.runner.executable_path != "" + runner_config.package != null && runner_config.settings.runner.runner_executable != "" ) cfg.runners ); in mkIf (redundantRunners != [ ]) [ '' Under programs.lutris.runners, the following lutris runners had both a - .package and .settings.runner.executable_path options set: + .package and .settings.runner.runner_executable options set: - ${concatStringsSep ", " redundantRunners} - Note that executable_path overrides package, setting both is pointless. + Note that runner_executable overrides package, setting both is pointless. '' ]; home.packages = @@ -179,9 +179,9 @@ in "${runner_name}" = (optionalAttrs (runner_config.settings.runner != { }) runner_config.settings.runner) // (optionalAttrs - (runner_config.package != null && runner_config.settings.runner.executable_path == "") + (runner_config.package != null && runner_config.settings.runner.runner_executable == "") { - executable_path = getExe runner_config.package; + runner_executable = getExe runner_config.package; } ); } diff --git a/tests/modules/programs/lutris/runners-configuration.nix b/tests/modules/programs/lutris/runners-configuration.nix index 5d9d3845..c5ca4e94 100644 --- a/tests/modules/programs/lutris/runners-configuration.nix +++ b/tests/modules/programs/lutris/runners-configuration.nix @@ -6,7 +6,7 @@ cemu.package = pkgs.cemu; pcsx2.settings = { system.disable_screen_saver = true; - runner.executable_path = "${pkgs.pcsx2}/bin/pcsx2-qt"; + runner.runner_executable = "${pkgs.pcsx2}/bin/pcsx2-qt"; }; rpcs3 = { package = pkgs.rpcs3; @@ -23,18 +23,18 @@ runnersDir = "home-files/.config/lutris/runners"; expectedCemu = builtins.toFile "cemu.yml" '' cemu: - executable_path: '${lib.getExe pkgs.cemu}' + runner_executable: '${lib.getExe pkgs.cemu}' ''; expectedPcsx2 = builtins.toFile "pcsx2.yml" '' pcsx2: - executable_path: '${pkgs.pcsx2}/bin/pcsx2-qt' + runner_executable: '${pkgs.pcsx2}/bin/pcsx2-qt' system: disable_screen_saver: true ''; expectedRpcs3 = builtins.toFile "rpcs3.yml" '' rpcs3: - executable_path: '${lib.getExe pkgs.rpcs3}' nogui: true + runner_executable: '${lib.getExe pkgs.rpcs3}' system: disable_screen_saver: true '';