https://www.wikihow.com/Make-Nettle-Spray-for-Aphids
https://www.hunker.com/12166118/how-to-make-a-nicotine-insecticide
If you ever plan to flood it and add lifestock beter leave out the soap.
If it is intended as permanent emersed setup than in some cases depending on which critter you like to kill. Deluting a bit of dishwashing soap in water also can be efective. Because it's a petrol based product that will damage/weakens the insects protective waxy skin coating. It helps for toxines to penetrate but also makes the insect susceptible for bacterial infection and die. Next to that Dishwashing soap also contains a tiny bit of NPK and will provide a bit foilage fertilization.
Try to determine what fly you have by
@Edvet advice.. In the garden centre you get those sticky traps in sqaure plastic strips, Usualy yellow in color. You can cut to size and hang in the tank. Get a pocket microscope and see what you catch. Is it green fly than spraying the above can be effective, make sure you spray the underside of the leaves, damaging larvae usualy stay at the leaves underside/ If you see them top side, you probably have a severe infestation with an already overpopulated underside.
🙂
Do you catch Gnats, that's a different story, these lay their eggs and larvae in the substrate, the larvae live of plant roots, than spraying wont help much. Than you need to ask around in garden centres for biological remedies like Nematodes,these are little worms that predate on the gnat larvae.
About every insect larvae has its natural enemies, for example the Lady bug loves to eat greenfly babies.
Lacewing fly i.a. Chrysoperla Carnea larvae are fears louse predators.
Killer mites can eradicate spider mites. Not realy a toxin available for these little monsters.
There are suppliers for natural biological enemies for pests. Usualy not the cheapest way. But in a little closed invironment darn effective.
Once all is eraditacted the predator will die off starvation, not realy nice but you wont create one pest with the other.
But first find out what you are fighting. i.a. Greenfly, Gnat, White fly or Thrips etc.

After a few years fighting you might just recognize the damage and know who did it by the looks of it..