Diatomaceous earth will take care of your bugs. It is fossilized single cell organisms. Spread some over the top of your soil. The bugs will not go near it if they do they die.
It makes the surface of the soil a very dangerous place for these lil insects. The fossils are of course lil bones that are razor sharp, once the insect lands and tries to walk around the fossils cut him all to hell causing him to bleed to death.
Scorpion Juice will also keep gnats at bay. Or the new Bud Factor X will also, it is a new formulation of Scorpion Juice with Colossal Bud Blast mixed in. But it is pricey. Good luck.