Good advice. I’ll add that any time you have to parse command line arguments with any real complexity you should probably be using Python or something. I’ve seen bash scripts where 200+ lines are dedicated to just reading parameters. It’s too much effort and too error prone.
I did this swap recently as well, on Fedora. I had to do literally nothing, as the drivers were already available and installed. I uninstalled akmod-nvidia to tidy up, but I suppose even that wasn’t strictly required.