Portnugsanswered grow question 3 years ago I hate gnats, that's the reason I changed to Hydro, very difficult to control when things get hot they really thrive.
I read a lot of solutions for killing their eggs but found the best solution was a natural preditor. Applied these once in my grow and all the rest of the house plants and possible gnat sources and problem was solved. You do need to be cautious not to apply too many mites but I'm not very experienced and worked well for me.
https://www.koppert.com/entomite-m/