I think you need to spare the Geth at the space station during Legion's loyalty mission, settle the argument between Legion and Tali peacefully, and successfully defend Tali's innocence during her loyalty mission.
The only thing from Mass Effect 2 that is *required* to make peace in ME3 is that both Tali and Legion survive the suicide mission, since both must be present on Rannoch for the peace to occur.
However, the following things help (i.e. contribute to getting the Paragon/Renegade options that stop the battle):
- Destroy rather than reprogram the Geth heretics
- Settle the Tali/Legion argument without losing either's loyalty. (This means using the P or R dialog option at that time; losing and later regaining loyalty doesn't count towards the Rannoch reputation check)
You need to complete their loyalty missions if you plan to use them for operations on the suicide mission, otherwise they will usually die. If that happens, then you won't get peace for the Quarian-Geth. However, if you simply don't pick them, then it doesn't matter. However, canonically, Legion's loyalty mission are pretty crucial to ME3 for war assets for 100%. I know dealing with the Geth Base with decide the power of the Geth and Quarian fleets when you get either or both, based on the number of Geth that were in service. If more Geth are in the initial fleet than the Quarians will lose more assets, likewise the opposite if there is less Geth.