The IRX–β dust attenuation relation in cosmological galaxy formation simulations | Synapse