Koopmans-compliant functionals have been shown to provide accurate spectral properties for molecular systems; this accuracy is driven by the generalized linearization condition imposed on each charged excitation, i.e., on changing the occupation of any orbital in the system, while accounting for screening and relaxation from all other electrons. In this work, we discuss the theoretical formulation and the practical implementation of this formalism to the case of extended systems, where a third condition, the localization of Koopmans's orbitals, proves crucial to reach seamlessly the thermodynamic limit. We illustrate the formalism by first studying one-dimensional molecular systems of increasing length. Then, we consider the band gaps of 30 paradigmatic solid-state test cases, for which accurate experimental and computational results are available. The results are found to be comparable with the state of the art in many-body perturbation theory, notably using just a functional formulation for spectral properties and the generalizedgradient approximation for the exchange and correlation functional.