  The classical Hochschild cohomology theory of rings is extended to abelian
heaps with distributing multiplication or trusses. This cohomology is then
employed to give necessary and sufficient conditions for a Nijenhuis product on
a truss (defined by the extension of the Nijenhuis product on an associative
ring introduced by Cari\~nena, Grabowski and Marmo in [Internat. J. Modern
Phys. A 15 (2000), 4797-4810, arXiv:math-ph/0610011]) to be associative. The
definition of Nijenhuis product and operators on trusses is then linearised to
the case of affine spaces with compatible associative multiplications or
associative affgebras. It is shown that this construction leads to compatible
Lie brackets on an affine space.
