How to make Void Linux with Nvidia drivers sleep (suspend) properly

I simply followed the instructions here: https://www.reddit.com/r/voidlinux/comments/1gxae29/fixing_kde_plasma_sleep_suspend_with_void_linux/ You might be able to apply the same solution in other distros, if you happen to have the same problem.