  We present a method for generating homogeneous and tunable magnetic flux for
bosonic particles in a lattice using Rydberg atoms. Our setup relies on Rydberg
excitations hopping through the lattice by dipolar exchange interactions. The
magnetic flux arises from complex hopping via ancilla atoms. Remarkably, the
total flux within a magnetic unit cell directly depends on the ratio of the
number of lattice sites to ancilla atoms, making it topologically protected to
small changes in the positions of the atoms. This allows us to optimize the
positions of the ancilla atoms to make the flux through the magnetic unit cell
homogeneous. With this homogeneous flux, we get a topological flat band in the
single-particle regime. In the many-body regime, we obtain indications of a
bosonic fractional Chern insulator state at $\nu = 1/2$ filling.
