Discrete G-connections

Apparently there is a notion of for example a $G$-connection on a discrete set. I've understood that this is a standard tool in for example lattice gauge theory. I'm looking for references to learn more about this (i.e. discrete 1-forms, connections, etc.) in the discrete setting.

More specifically, suppose I have a set $V$ of vertices and a set $E$ of directed edges. Let $G$ be a finite (perhaps non-abelian) group. What is the right notion of $G$-connection on $(V,E)$? Is there some classification of connections? In particular, I suppose it might matter if the directed graph can be drawn on a torus or on a sphere (or the plane).

Any references to literature where the basic notions are described is greatly appreciated.

-

For a finite group $G$, the notion of a $G$-connection is easy to define; it is usually done when you have not just a graph but a 2-complex and add a condition that the monodromy of connection around the boundary of each 2-cell is trivial. If you apply it to a cell decomposition of a closed surface, you get the space of gauge equivalence classes of $G$-bundles on the surface, so teh result does not depend on the choice of cell decomposition. This is a special (and well-known) example of Turaev-Viro theory, which in this case is also known as Chern-Simons theory with a finite gauge group (see paper of Freed and Quinn in CMP vol. 156).
For a finite group, every connection in a $G$-bundle over a manifold is automatically flat. –  Sasha Kirillov Nov 13 '10 at 4:30