X-ray emission from haloes of simulated disc galaxies