The part that literally says "...module_specification = {module_slots=6}".
Basically, the only lines you want to keep are 5 (which changes which modules can be put in a beacon) and 27 to 32 (remove recipe limitations from all modules).
I made a mod, unlimited productivity, that allows productivity modules in beacons and for all recipes (furnace, chemical plant, assembling machine, ...), but doesn't change the slots in anything (at least by default; you can increase beacon slots in mod options).