Other than that, it's largely a matter of balancing out Ph. Dark roasted malts are more acidic, so you add things to make the water harder (i.e. higher Ph) via relatively neutral-tasting things like CaCO3. Light roasted malts need softer water to stay in the same ideal Ph range (slightly acidic) during the mashing process, and if you go too far out of that range you'll get less than ideal results even with the same mash temps. That's not to say there aren't other aspects, but SO4 vs Cl ratio and overall water hardness for Ph control are the two main "knobs" in water chemistry for brewing.
The more interesting thing is the role water chemistry plays on the regional history of beers. In the past, you couldn't easily alter water chemistry. As a result, you see darker beers dominate where you have limestone aquifers with harder water that's ideal to offset the acid in dark roasted malts (e.g. lots of the UK) and lighter beers dominate where you have softer water in sandstone aquifers that's better for brewing them (e.g. lots of Germany and Czechia). It's hard to make a nice clean pilsner with hard water from a limestone aquifer, and you're not going to make a good porter with soft water from a sandstone aquifer.
So as a geologist, I've always found it kind of neat that geology is a core part of why certain beer styles arise in certain areas.