Looks like sniper play is popular!
My first one was a pipe, upgraded to an Advanced .308 receiver. Then it got upgraded to .50 (with all the other features at max and a suppressor).
Then I found an "infinite" ammo .50 cal. I figured this meant it only needed 1 round and could fire infinitely, but it actually means you never have to reload it (though you need ammo for it). I think I'm going to retire it to full-auto status in a while.
I found a gauss rifle and the damage on it with Rifleman 4 is insane: 330 or something along those lines. I forget if it has any legendary perks on it. I think it does, though it is not particularly good for a sniper.
Anyway, with that much base damage and such a limited magazine capacity, I'm now leaning toward that Gauss becoming my sniper rifle.
My CQB rifle is the "Righteous" thing you get from one of the early quests, with reflex sight. My third ranged weapon is an Incendiary Shotgun, and melee is a legendary Revolutionary Era sword that costs 25% AP and has a stunpack installed.
Nothing else I've found seems ideal for a sniper, and I tihnk "Instigating" is the Legendary trait that would be most appropriate for a sniper rifle. An Institgating Gauss rifle with full Rifleman perks and fully modded could probably take out nearly anything in the game in one shot.