can you get all your water from desal?

if solar keeps getting cheaper and cheaper, and desalination technology improves, could you get all your fresh water from desal?

the idea is you'd create a massive oversupply of solar, and when you have excess electricity, you'd just store some in batteries/pumped-hydro and use the rest for desal.