Magnetic structure of the quasi-two-dimensional antiferromagnet NiPS3