World War I would have lasted less than six months if this were not true, since the British could have easily blockaded German import of salt peter from Chile - the world supply at the time - and prevented them from making gun powder.
Fortunately for Germans - or unfortunately as it worked out for them and everyone else involved - Fritz Haber had invented the Haber-Bosch process for nitrogen fixation.
The great thinker Vaclav Smil wrote a fabulous book Enriching the Earth early in this century describing the invention of the process.
The world food supply depends on this process up until this day.
If nuclear energy dominated the world supply of electricity, which regrettably it doesn't, there might be a case for electrolysis, although it is well known and well documented that electrolytic hydrogen is very expensive and thus trivial.
Right now, because of the 2nd law of thermodynamics, using nuclear energy to produce hydrogen is both stupid and wasteful.
There are well known thermochemical cycles for producing hydrogen directly from heat, but they have only been - I believe - piloted in China using nuclear energy. In process intensification, with heat networks, this could increase the thermodynamic efficiency of nuclear heat sources to better than 70% according to my own calculations.
There is a huge difference between could and is. The abuse of the word could like the abuse of the word green, particularly in connection with hydrogen is a big reason why the planetary atmosphere is collapsing.