Desalination plants are capital intensive, and no one who builds them wants to run them only occasionally. They want to run them nearly all the time. Thus, nuclear, hydro, and geothermal are the best suited zero-carbon energy sources to work for it. Wave and tidal energy has not been deployed at any meaningful scale, but once they're in full production at scale then sure they could be used too.