In recent years, attempts to generalize lattice gauge theories to model topological order have been carried out through the so called $2$-gauge theories. These have opened the door to interesting new models and new topological phases which are not described by previous schemes of classification. In this paper we show that we can go beyond the $2$-gauge construction when considering chain complexes of abelian groups. Based on elements of homological algebra we are able to greatly simplify already known constructions for abelian theories under a single all encompassing framework. Furthermore, this formalism allows us to systematize the computation of the corresponding topological degeneracies of the ground states and establishes a connection between them and a known cohomology, which conveniently characterizes them with a suitable set of quantum numbers.