Just a quick tip if anyone gets stuck with this like I did. If anyone is using the sway betas I recommend you add the following patch for now:
--- a/sway/main.c
+++ b/sway/main.c
@@ -280,11 +280,9 @@
// Security:
unsetenv("LD_PRELOAD");
-#ifdef _LD_LIBRARY_PATH
- setenv("LD_LIBRARY_PATH", _LD_LIBRARY_PATH, 1);
-#else
- unsetenv("LD_LIBRARY_PATH");
-#endif
+
+ // NixOS:
+ setenv("LD_LIBRARY_PATH", "/run/opengl-driver/lib:/run/opengl-driver-32/lib", 1);
int c;
while (1) {
Currently the new meson build does not support setting LD_LIBRARY_PATH as a build argument and it is automatically unset as part of a security feature of sway. As such - LD_LIBRARY_PATH is never set properly with sway betas.
Hope this helps!