Yes, but Remember that Invisible is Not Hidden
The other answers are correct in their assertion that Nondetection counters divination magic as written and that See Invisibility falls under that criteria.
I would also like to address another concern, however. You state in your question:
However, then I've realized that then Greater Invisibility + Nondetection would be extremely overpowered: you're just buffing your rogue/ranger/fighter with these spells and he just kills everyone with insane all-advantage attacks. And even those mages can't see you with a standard See Invisibility buff.
You're correct that this would be powerful, but I'm not sure if it would rise to the level of being overpowered per se. Consider that for this to work, 2 characters have to work together; and 1 of them needs to be a caster capable of at least 4th level spells (so at least 7th level), then has to supplement a 3rd level spell, and also needs to expend that slot and maintain concentration.
Doing so will result in an invisible Rogue moving about the field and capable of dealing a bunch of damage for 1 minute.
However, unless the Rogue spends a Bonus Action each turn with their Cunning Action then each attack will give away their location, see Unseen Attackers and Targets which states:
If you are hidden - both unseen and unheard - when you make an attack, you give away your location when the attack hits or misses.
Thus, the Rogue is going to still need to keep hiding if they want to avoid attacks coming their way (granted those attacks will likely be at Disadvantage).
But consider the alternative, which is the Rogue's hard to find, but there's a squishy caster I can see. If I hit them hard enough, that might break concentration and then I can find the Rogue.
Overall, I don't find this to be particularly overpowered.
In my experience with playing a ranged Rogue, it's often very easy for a Rogue to find sources of cover sufficient for them to almost always be able to make a successful Hide attempt and rarely are enemies' Perception scores high enough to make the relevant Dexterity (Stealth) check overly difficult.
Ultimately, this just makes what was an easy job even easier.