Seems like you’re hitting MESA-LOADER: failed to open $driver · Issue #94315 · NixOS/nixpkgs · GitHub. MESA-LOADER: failed to open $driver · Issue #94315 · NixOS/nixpkgs · GitHub and the following comments/replies should be relevant. You can check by running export LIBGL_DEBUG=verbose before you start Sway or by adding that to programs.sway.extraSessionCommands.
I cannot reliably answer the home-manager part since I don’t use it, but AFAIK you should set programs.sway.enable for NixOS and can configure the rest through home-manager.