We introduce a novel approach to model heat transport in solids, based on the Green-Kubo theory of linear response. It naturally bridges the Boltzmann kinetic approach in crystals and the Allen-Feldman model in glasses, leveraging interatomic force constants and normal-mode linewidths computed at mechanical equilibrium. At variance with molecular dynamics, our approach naturally and easily accounts for quantum mechanical effects in energy transport. Our methodology is carefully validated against results for crystalline and amorphous silicon from equilibrium molecular dynamics and, in the former case, from the Boltzmann transport equation.