The internet and chat say to just click and drag them over each other but I’ve tried many combinations and key modifiers of this and there’s no indication that anything is grouping, the modules just change position when dragged.
Another person said that there should be a chain icon near the HUD but I’m not seeing one, I just have the four or so lines icon for options (but nothing in there about grouping weapons).