The VSEPR theory tells us that electron domains tend to maximize the distances between them. Hence, in order to know the shape of the molecule, and the orientation of the electron domains, we must first identify its molecular structure, bonds, and lone pairs.
Nitrogen has 5 valence electrons. In order to satisfy the octet rule by bonding with itself, to form diatomic nitrogen, there must be a triple bond, between the two atoms. Then, each nitrogen would have a lone electron pair each. (Let's check the number of electrons. There should be 10, 5 from each atom. The triple bonds is 6 electrons; the lone pair on the first N is 2, another lone pair from the other is another 2 -- in total, this gives us 10). Hence, the dinitrogen molecule is composed of a triple bond, and an electron pair on each nitrogen. (See attached image in references).
The electron domains will repel each other, so the distance must be maximized -- this would happen, if the orientation is linear. (Note that we consider the triple bond as one domain). That means that the shape of the domains (with respect to each N) is linear (180 degrees separation between both lone pairs and the triple bond).