There is a component which allows you to add icons to the links in the top navigation: Discourse Nav Item Icon / Emoji
and it also works with custom links added by this component. The only difference is that you need to add custom_
in front of the name of the nav item.
For example,
I added a “Preferences” link with the help of this component: Preferences;edit your preferences;/my/preferences
And then I configured the icon/emoji component to add the wrench icon: icon:custom_preferences:solid:wrench:currentColor
Result: