The geometric Langlands program is distinguished in assigning spectral decompositions to all representations, not only the irreducible ones. However, it is not even clear what is meant by a spectral decomposition when one works with non-abelian reductive groups and with ramification. The present work is meant to clarify the situation, showing that the two obvious candidates for such a notion coincide.More broadly, we study the moduli space of (possibly irregular) de Rham local systems from the perspective of homological algebra. We show that, in spite of its infinite-dimensional nature, this moduli space shares many of the nice features of an Artin stack. Less broadly, these results support the belief in the existence of a version of geometric Langlands allowing arbitrary ramification.Along the way, we give some apparently new, if unsurprising, results about the algebraic geometry of the moduli space of connections, using Babbitt-Varadarajan's reduction theory for differential equations.