If you're talking about gasoline I think it might be pointless as you'll still lose lighter components through evaporation into the N2 layer. A sealed container that will withstand the Reid Vapor Pressure at the temps you might expect would be best for that since once the RVP is reached in the container no more will evaporate. I've used steel drums for the purpose. Incidentally, summer fuel blends have a lower RVP at a given temperature than winter fuel blends in order to cut down on evaporative losses and presumably for environmental protection reasons.
Diesel? I don't know. Oxidation prevention might be useful but I doubt N2 will stop the bacteria from growing over time. I think sealed is best here as well. YMMV