  We introduce a generalisation of the KP hierarchy, closely related to the
cyclic quiver and the Cherednik algebra $H_k(\mathbb Z_m)$. This hierarchy
depends on $m$ parameters (one of which can be eliminated), with the usual KP
hierarchy corresponding to the $m=1$ case. Generalising the result of G.
Wilson, we show that our hierarchy admits solutions parameterised by suitable
quiver varieties. The pole dynamics for these solutions is shown to be governed
by the classical Calogero-Moser system for the wreath-product $\mathbb Z_m\wr
S_n$ and its new spin version. These results are further extended to the case
of the multi-component hierarchy.
