The disclosure provides a bioreactor system for conducting nitrogen fixation with renewable electricity to produce an engineered soil microbiome enriched in ammonia and carbon. The disclosure further provides an inorganic-biological hybrid bioreactor system that couples the generation of H2 by electricity-dependent H2O-splitting with the nitrogen-fixing capabilities of autotrophic, N2-fixing microorganisms to cultivate NH3-enriched and/or carbon-enriched biomass. The disclosure also provides methods for using NH3-enriched and/or carbon-enriched biomass for applications, such as, biofertilizers for improving the characteristics and performance of soils, e.g., to enhance the yield of agricultural crops. The disclosure further provides biofertilizers, as well as engineered soils and seeds augmented with a biofertilizer.