I will explain the construction of a PGL2(Fp)-equivariant cohomology theory associated to a tower of quaternionic Hilbert modular varieties. This provides a natural construction of deformations of Galois representations attached to Hilbert modular forms. As anapplication I will show that two L-invariants are the same: the Mazur-Tate-Teitelbaum type L-invariant defined in terms of the Galois representation and the Darmon type L-invariant defined in terms of the cohomology of (Sp-)arithmetic groups. This approach does not rely on the existence of p-adic families of automorphic forms.