These can be called noun adjuncts, attributive nouns, or noun modifiers.

You can see Wikipedia's summary here. And here is an excerpt from that article regarding pluralizing the first noun:

Noun adjuncts were traditionally mostly singular (e.g. "trouser press") except when there were lexical restrictions (e.g. "arms race"), but there is a recent trend towards more use of plural ones. Many of these can also be and/or were originally interpreted and spelled as plural possessives (e.g. "chemicals' agency", "writers' conference", "Rangers' hockey game"), but they are now often written without the apostrophe, although decisions on when to do so require editorial judgment.

I think a rule of thumb is to make the first noun singular and the second noun plural (if your intent is to pluralize), and simply remember specific exceptions to this rule: sports, arms, antiquities, writers, chemicals, [suggest others in comments].