Ammonia can be generated through electrolysis as feed-stock for Haber-Bosch to get nitrogen, so literally forever. The reason we use petroleum is because it's currently cheaper than solar PV electrolysis.

Sure, but it would take some time to transition to ramp up production to the scale required by world-scale agriculture. We're using petroleum for this because it was cheap & easy. Not saying we can't transition, but it will take time.

Right, but it's possible with existing tech and there's no scenario where oil disappears all at once. Its a highly geographically distributed resource.