I will argue that observations of the diffuse gas in the outskirts of galaxies, the so called circumgalactic medium, are essential for constraining the 'initial conditions' for galaxy formation. Such observations provide a fruitful comparison to theory, because hydrodynamics at moderate overdensities is much easier to simulate than molecule or star-formation. A novel technique will be introduced, whereby a foreground quasar (and massive galaxy) can be studied in absorption against a background quasar, resolving scales as small as 30kpc. This experiment reveals a rich absorption spectrum which contains a wealth of information about the physical conditions of diffuse gas around massive proto-galaxies. I will summarize the implications of these new measurements in the context of galaxy formation models, and discuss the possibility of detecting cooling radiation in emission from the gas we study in absorption.