I think there is some merit to the idea, but not in such blunt terms. There's no such thing as 'being nice to everyone,' and don't kid yourselves otherwise. If you're 'nice' to everyone in the sense that you put everyone else before yourself, then you're not being nice, you're just spineless. This sends out a warning signal to basically anybody who might be interested in you that they can expect no special treatment. They get nothing from you, because you're not withholding anything from anyone else. Plus, how can you be trusted to step in on their behalf if you won't step in on your own? Giving up your seat to anyone and everyone, ceding the best views to obnoxious Dutch tourists, apologising meekly when you're clearly in the right, that's what being nice to everyone looks like.
Nice people aren't interesting. Not exciting, not dynamic, just universal sycophants. Now obviously I'm not saying everyone should go out punching old people or refusing to give up a seat to a pregnant woman, but I am saying you should put yourself and your inner circle before total strangers. That earns loyalty. That says to people, "I'm worth getting to know."
It also separates the seed from the chaff. If they can't tolerate your cocky attitude or self-assured behaviour, then they probably weren't worth hanging out with anyway. There's enough people in the world for us to be picky about the people we're nice to.
Note - I'm also not advocating vandalism, making a mess of your mates' houses, being abusive or generally behaving like a dickhead. Those things impress nobody.