Cosmological galaxy formation simulations with dust