The fast radio burst FRB 121102 has repeated multiple times, enabling the identification of its host galaxy and of a spatially-coincident, compact, steady ('persistent') radio synchrotron source. It was proposed that FRB 121102 is powered by a young flaring magnetar, embedded within a decadesold supernova remnant. Using a time-dependent one-zone model, we show that a single expanding magnetized electron-ion nebula (created by the same outbursts likely responsible for the FRBs) can explain all the basic properties of the persistent source (size, flux, self-absorption constraints) and the large but decreasing rotation measure (RM) of the bursts. The persistent emission is powered by relativistic thermal electrons heated at the termination shock of the magnetar wind, while the RM originates from non-relativistic electrons injected earlier in the nebula's evolution and cooled through expansion and radiative losses. The model contains few free parameters, which are tightly constrained by observations: the total energy injected into the nebula over its history, ∼ 10 50 −10 51 erg, agrees with the magnetic energy of a millisecond magnetar; the baryon loading of the magnetar outflow (driven by intermittent flares) is close to the neutron star escape speed; the predicted source age ∼ 10 − 40 years is consistent with other constraints on the nebula size. For an energy input rateĖ ∝ t −α following the onset of magnetar activity, we predict secular decay of the RM and persistent source flux, which approximately follow RM ∝ t −(6+α)/2 and F ν ∝ t −(α 2 +7α−2)/4 , respectively.