When they can make food from waste.
- Maybe in the future they could use fusion reactors for power, synthesizing Deuterium and/or Tritium to enhance their endurance (maybe indefinitely?)
- make the carrier (with minimal crew) and the planes into drones (AFAIK already in research/testing) since even if the material could be at sea forever the people could not endure and also many probably wouldn't sign up for such a job
My understanding is the submarines have been doing that for a very, very long time. No challenge there.
Here's a random article from 2008 saying "decades": https://www.eastvalleytribune.com/opinion/nuclear-desalinati...