Cedar shavings, You can buy them at most plant stores.
They have been soaked in cedar oil for more potency. Like 6 bucks for a big jar.
Pour on the soil and don't get skimpy with the shit. Its like a giant salt shaker. Just cover the soil with the shavings.
The gnats have a very small window...