You can't dynamically import a module in Nim because it is a statically compiled language, (you end with your binary, you don't distribute the source code)
If you want to do that, you can compile your library as a shared library, but I'm 100% sure you don't need to do that to achieve what you want. Dynamic imports like that are a interpreted languages thing, and humans have been creating any imaginable kind of programs without them for decades
