Windows uses a special resource section in the exe to define an icon file.
You can probably make nim add it like: https://forum.nim-lang.org/t/4353 - I have never done this though...
In the past I used rcedit.exe https://github.com/electron/rcedit to add the icon to the exe file after it is already built.
rcedit "path-to-exe-or-dll" --set-icon "path-to-ico"
Note you need a special .ico file, that can be created using an ico editor.
There is an online ico editor you can use: http://www.xiconeditor.com/
Just upload your probably-PNG icon to that. Make sure you have all of the versions from 16x16 to higher ups.