  We present a study of metal-enriched halo gas traced by MgII and CIV
absorption at z<2 in the MUSE Analysis of Gas around Galaxies survey and the
Quasar Sightline and Galaxy Evolution survey. Using these large and complete
galaxy surveys in quasar fields, we study the dependence of the metal
distribution on galaxy properties and overdensities, out to physical projected
separations of 750 kpc. We find that the cool, low-ionization gas is
significantly affected by the environment across the full redshift range
probed, with ~2-3 times more prevalent and stronger MgII absorption in higher
overdensity group environments and in regions with greater overall stellar mass
and star formation rates. Complementary to these results, we have further
investigated the more highly ionized gas as traced by CIV absorption, and found
that it is likely to be more extended than the MgII gas, with ~2 times higher
covering fraction at a given distance. We find that the strength and covering
fraction of CIV absorption show less significant dependence on galaxy
properties and environment than the MgII absorption, but more massive and
star-forming galaxies nevertheless also show ~2 times higher incidence of CIV
absorption. The incidence of MgII and CIV absorption within the virial radius
shows a tentative increase with redshift, being higher by a factor of ~1.5 and
~4, respectively, at z>1. It is clear from our results that environmental
processes have a significant impact on the distribution of metals around
galaxies and need to be fully accounted for when analyzing correlations between
gaseous haloes and galaxy properties.
