  As stellar compositions evolve over time in the Milky Way, so will the
resulting planet populations. In order to place planet formation in the context
of Galactic chemical evolution, we make use of a large ($N = 5\,325$) stellar
sample representing the thin and thick discs, defined chemically, and the halo,
and we simulate planet formation by pebble accretion around these stars. We
build a chemical model of their protoplanetary discs, taking into account the
relevant chemical transitions between vapour and refractory minerals, in order
to track the resulting compositions of formed planets. We find that the masses
of our synthetic planets increase on average with increasing stellar
metallicity [Fe/H] and that giant planets and super-Earths are most common
around thin-disc ($\alpha$-poor) stars since these stars have an overall higher
budget of solid particles. Giant planets are found to be very rare
($\lesssim$1\%) around thick-disc ($\alpha$-rich) stars and nearly non-existent
around halo stars. This indicates that the planet population is more diverse
for more metal-rich stars in the thin disc. Water-rich planets are less common
around low-metallicity stars since their low metallicity prohibits efficient
growth beyond the water ice line. If we allow water to oxidise iron in the
protoplanetary disc, this results in decreasing core mass fractions with
increasing [Fe/H]. Excluding iron oxidation from our condensation model instead
results in higher core mass fractions, in better agreement with the core-mass
fraction of Earth, that increase with increasing [Fe/H]. Our work demonstrates
how the Galactic chemical evolution and stellar parameters, such as stellar
mass and chemical composition, can shape the resulting planet population.
