This is a bit late but I ran into the same issue which I was able to solve using the following shell.nix file to create a development shell to run the runClient task inside. You could easily modify this to work outside of a nix-shell by modifying the environment variable changed in the shellHook in your configuration.nix instead.
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
shellHook = ''
export LD_LIBRARY_PATH="''${LD_LIBRARY_PATH}''${LD_LIBRARY_PATH:+:}${pkgs.libglvnd}/lib"
'';
}
Place this file inside your mod directory and then run nix-shell before running ./gradlew runClient and Minecraft should start normally. Credit to this solution in the post you originally linked for the code which I modified slightly.