Putting a layer of sand on top of your soil will stop the fungus gnats from bieng able to burrow and breed under the soil. You just have to water them gently afterwards to keep the sand in place and not wash it down into the soil