How fertilizer works is by providing specific nutrients, usually in the form of either slow releasing solids or as water soluble chemicals. There's also slow releasing water soluble "capsules". The main activation being the chemicals that plants use to grow and development. The main one are NPK, or Nitrogen, Phosphorus, Potassium. You need a large uptake of Nitrogen for leafy veg like Cabbages, a large uptake of Phosphorus for fruiting and root, like strawberries and potatoes and a large uptake of Potassium for stem plants like broccoli, though potassium is more general purpose. All plants need all three in some amount as well as much smaller amounts of other elements like Iron or Sulfur.
How does this translate to starsector? Production of NPK can be produced from just about anything. Manure, or blood, fish & bone industrial waste, or potash are examples of traditional sources, whilst nowadays chemical processing can be taken from all sorts of sources. For instance N is mainly produced from water, natural gas and air. Since Starsector is supposed to be a highly advanced technologically, you can find reasons for fertilisers to be produced from Ore, Organics or Volatiles.
Better to just abstract it all. Let food be produced without requiring any physical inputs. If there needs be suggested any, let it be drugs as like for mining.