I’d say the blame is largely with NixOS at this point. I’ve written some snippets that replicate the X11 behavior for Wayland for a previous attempt at making this more user-friendly:
- dotfiles/nixos-modules/nvidia/de-compat.nix at 0328c4b41692df3152b88a04584ae4084afc79c8 · TLATER/dotfiles · GitHub
- dotfiles/nixos-modules/nvidia/prime.nix at 0328c4b41692df3152b88a04584ae4084afc79c8 · TLATER/dotfiles · GitHub
This didn’t end up helping people in real-world use when I asked them to copy those bits out, because the rest of the module is too complex, making them run into other issues and ultimately giving up on the complexity of adding my magic snippets that they also don’t understand.
I didn’t get to upstreaming it either because I’d also want to change how the udev rules work a little (it really sucks that we don’t have a nice services.udev.rules that doesn’t just collapse into a single file). I’d also have to untangle the current X11 config to make sure it doesn’t do anything wonky with xwayland, in addition to figuring out stuff like an equivalent to “reverse” prime, and I don’t have any test cases myself at the moment.
The nvidia driver and at least sway seem to be working quite well together these days as far as I can tell. I’ve personally had no real issues wayland for at least a year now, and I’ve been test-driving multi-gpu on one of my machines precisely because I wanted to make sure my code works.