This is less of a NixOS question, and more of a GNOME question, but so far my Google-foo has proven not up to the task.
Does anyone know if it’s possible to disable XWayland in GNOME? I know that this is possible using Sway, but I haven’t been able to find any similar information for GNOME.
I’m guessing that this is either not possible or is going to require me to build out an overlay of some sort, but before I start walking down that path I wanted to see if anyone knew of an easy way (config file, dconf setting, environment variable, etc.) to do this.
Just to answer my own question, this doesn’t look to be possible right now. In particular, the notes for Mutter 3.34 imply that XWayland is required in 3.32.
Mutter and GNOME Shell 3.34 earned the ability to run as a pure Wayland compositor, while still providing seamless compatibility with X11 by starting XWayland when required by applications. This is the culmination of much prior effort at refactoring internals and ironing out indirect X11 dependencies throughout Mutter and GNOME Shell specifically, and the GNOME session generally.
Being able to start Xwayland and other related X11 services on demand for legacy applications came out organically, and demonstrates we are no longer tied by our legacy support.
This feature is disabled by default, and can be enabled by adding ‘autostart-xwayland’ to org.gnome.mutter experimental-features.
In 3.36 3.34 [edit: I incorrectly wrote this as 3.36, but should have written 3.34 as per the above quote] (which I think is going to be in NixOS 20.03?) it’s going to be possible to launch XWayland on-demand (rather than automatically at startup) using the experimental feature key noted in the above excerpt. As far as I can tell, however, it won’t be possible to disable XWayland even then.