The power spectrum of cosmic infrared background (CIB) anisotropies is sensitive to the connection between star formation and dark matter haloes over the entire cosmic star formation history. Here we develop a model that associates star-forming galaxies with dark matter haloes and their subhaloes. The model is based on a parametrized relation between the dust-processed infrared luminosity and (sub)halo mass. By adjusting three free parameters, we attempt to simultaneously fit the four frequency bands of the Planck measurement of the CIB anisotropy power spectrum. To fit the data, we find that the star formation efficiency must peak on a halo mass scale of ≈5 × 1012 M⊙ and the infrared luminosity per unit mass must increase rapidly with redshift. By comparing our predictions with a well-calibrated phenomenological model for shot noise, and with a direct observation of source counts, we show that the mean duty cycle of the underlying infrared sources must be near unity, indicating that the CIB is dominated by long-lived quiescent star formation, rather than intermittent short ‘starbursts’. Despite the improved flexibility of our model, the best simultaneous fit to all four Planck channels remains relatively poor. We discuss possible further extensions to alleviate the remaining tension with the data. Our model presents a theoretical framework for a future joint analysis of both background anisotropy and source count measurements.