RuneLite runs natively, launched from the official Jagex Launcher's Linux beta. Both are installed by the gaming role (see modules/home/gaming.nix), and there's no manual setup beyond logging in.
Previously this was the Windows Jagex Launcher running in Wine through Lutris, with RuneLite's
RuneLite.exeswapped for a script that ran the Linux AppImage. The Windows RuneLite no longer starts under Wine, and the Linux launcher makes the whole thing unnecessary.
- The launcher is packaged in
pkgs/jagex-launcher.nix. Jagex only ships an AppImage, so it runs in an FHS wrapper. The package's desktop entry also handlesrshub://links, which the login flow redirects back through. - RuneLite: when you hit Play, the launcher runs
~/.local/share/Jagex Launcher/games/runelite/RuneLite.AppImage, downloading it first if nothing is there. The download is RuneLite's generic Linux AppImage, which NixOS can't run. Home Manager puts a link to the nixpkgsruneliteat that path instead, so the launcher never downloads anything and runs ours. - Logging in: the launcher hands the session to RuneLite through the
JX_SESSION_ID,JX_CHARACTER_ID, andJX_DISPLAY_NAMEenvironment variables.
The runelite in the gaming role is wrapped to:
- Set
GDK_SCALE=2, since the client is too small on a 4K monitor otherwise. - Unset
APPIMAGEandAPPDIR. If RuneLite seesAPPIMAGE, it assumes it is an AppImage and relaunches the client through whatever that points at. Any variables the launcher sets would leak through to RuneLite, so this guards against that.
You can also set _JAVA_AWT_WM_NONREPARENTING=1 in that wrapper if using a tiling WM.
The launcher can't update itself in place when installed this way. To update it, take the new version and sha512 from the update feed and put them in pkgs/jagex-launcher.nix. The feed's sha512 is already base64, so it goes straight into the sha512-... hash.
- Play does nothing: the launcher logs "Launched RuneLite" as soon as the process starts, even if it dies right away, so its own log (
~/.config/Jagex Launcher/logs/) won't show the problem. Check~/.runelite/logs/launcher.loginstead. - The launcher downloaded RuneLite anyway: check that
~/.local/share/Jagex Launcher/games/runelite/RuneLite.AppImageis still the Home Manager link. If it was replaced, delete it and switch again.