We simulate the formation of domain walls in two-dimensional assemblies of magnetic nanoparticles. Particle parameters are chosen to match recent electron holography and Lorentz microscopy studies of almost monodisperse cobalt nanoparticles assembled into regular, elongated lattices. As the particles are small enough to consist of a single magnetic domain each, their magnetic interactions can be described by a spin model in which each particle is assigned a macroscopic "superspin." Thus, the magnetic behaviour of these lattices may be compared to magnetic crystals with nanoparticle superspins taking the role of the atomic spins. The coupling is, however, different. The superspins interact only by dipolar interactions as exchange coupling between individual nanoparticles may be neglected due to interparticle spacing. We observe that it is energetically favorable to introduce domain walls oriented along the long dimension of nanoparticle assemblies rather than along the short dimension. This is unlike what is typically observed in continuous magnetic materials, where the exchange interaction introduces an energetic cost proportional to the area of the domain walls. Structural disorder, which will always be present in realistic assemblies, pins longitudinal domain walls when the external field is reversed, and makes a gradual reversal of the magnetization by migration of longitudinal domain walls possible, in agreement with previous experimental results.