You can run an ICE on hydrogen, with some minor modifications. If you have enough space you can store the produced hydrogen at near atmospheric pressure in a gas holder/gasometer: https://en.wikipedia.org/wiki/Gas_holder
As to nitrogen fertilizer, there have been recent improvements in air nitrogen fixation by way of an electric arc/plasma: https://duckduckgo.com/?t=ffab&q=nitrogen+fixation+electric+arc&ia=web e.g. https://pubs.rsc.org/en/content/articlehtml/2021/ra/d1ra01357b