An onychophagist bites their nails. The word seems to appear mainly in quizzes and spelling bees. Onychophagist (and onychophagia, for the condition) seem not to be used even in the academic medical literature, the English nail biter being preferred. This is a rare example in fiction:
“I'll concede that she is useful” she said to me and George at dinner one night, “but she's colourless, odourless and entirely non-addictive. Also she is an onychophagist.” “That sounds,” George said, “as if it might be even more fatal than being a Roman Catholic. Dare you tell us what it means?” “It means that she bites her nails!”
George's Women, by Catherine MacArthur, 1974.
It comes from Greek onux/onukh–, a nail or claw, plus –phagia, devouring or eating. It should not be confused with onychotillomania, which is a nervous habit of picking at the fingernails to the extent of destroying them.
Other words that begin the same way include onychogryphosis, a claw-like overgrowth of a nail, and onychodystrophy, a condition in which the finger or toe nails are malformed or discoloured. The same Greek source gave us onyx for the stone, a variety of chalcedony that is often used for carving cameos, because some kinds of it resemble the pink and white of a human fingernail.