to clear this up.
nids...dont ally, period
necrons....also dont ally period, only fight against whom they need to die. even if this means fighting along side another race, but not allying. nobody knows when, where, or why they will ally with, only necrons knwo that!
eldar...ally with whom ever bebifits them the most(EoT for example, it was beneificl for them to ally with FoO agaisnt the dark eldar so they did) but there are eceptions(nids, DE...)
Imperium...ally with Daemonhunters and eldar(Imp and eldar have a respect for each toher, they save each other from time to time)
Tau...they do there own thang until they are out of options, when this comes i say they ally with imperium and whomever they are with
choas will not ally with anybody
orks...wont ally period.
so there arent that many alliances its pretty much everyone for them selves except for a few joints to fend off the rest