  We give a mathematical definition of irregular conformal blocks in the
genus-zero WZNW model for any simple Lie algebra, using coinvariants of modules
for affine Lie algebras whose parameters match up with those of moduli spaces
of irregular meromorphic connections: the open de Rham spaces. The
Segal--Sugawara representation of the Virasoro algebra is used to show that the
spaces of irregular conformal blocks assemble into a flat vector bundle over
the space of isomonodromy times \`a la Klares, and we provide a universal
version of the resulting flat connection generalising the irregular KZ
connection of Reshetikhin and the dynamical Knizhnik--Zamolodchikov connection
of Felder--Markov--Tarasov--Varchenko.
