NixOS v25.05 and configuring nerd-fonts without home-manager

Greetings!

Waybar requires nerd-fonts to populate the glyphs intended by the original author of the dotfiles I am working with. I am not sure which font my current Waybar is using, but something isn’t configured right because most of the font glyphs are absent. Here is a demo:

Here is the official NixOS Wiki page covering how to handle and manage fonts: Fonts - NixOS Wiki
Under the heading which reads: “Installing only specific nerdfonts”, the Wiki specifies that for NixOS v25.05 (unstable channel for now, the one I am using), the way NixOS handles fonts is going to change making most of what is on that page no longer relevant. The little bit which does address v25.05, I am using the recommended new method and have configured my NixOS accordingly.

My configuration.nix includes this expression:

fonts.packages = with pkgs; [
  nerd-fonts.fira-code
  nerd-fonts.droid-sans-mono
  nerd-fonts.noto
  nerd-fonts.hack
  nerd-fonts.ubuntu
  nerd-fonts.mplus
  ];

I can verify that these fonts are installed correctly because my multiple terminal emulators are able to access these fonts and use them. So that works.

My question is why is Waybar unable to access them? And can anyone offer a solution or lead?

This helpful NixOS chap provided some advice on how to configure Waybar using home-manager:

But the two issues with that approach are:

  1. I am not using home-manager (for now) because I am just being onboarded to NixOS package management and flakes and home-manager are out of reach.
  2. The next release of NixOS v25.05 changes are coming into effect which will involve configuring fonts differently and the current Wiki may be out of date.

Therefore given that the Wiki might not be complete to account for how to configure fonts for the unstable channel, how do I install nerd-fonts without home-manager so that Waybar can begin using them?

If other forum members may be curious or if it may help, here is my configuration.nix and dotfiles:

Maybe try installing nerd-fonts.symbols-only? I haven’t used Waybar in a bit, but last time I did I had it working with that.

Thanks for the feedback. I experimened with your suggestion by installing nerd-fonts.symbols-only. I logged out and logged back into Hyprland. No dice.

I suppose it is also worth pointing out that my Waybar styles.css includes these lines:

/** ********** Fonts ********** **/
* {
    font-family: "JetBrains Mono", "Symbols Nerd Font", Iosevka, archcraft, sans-serif;
    font-size: 12px;
}

I have nerd font symbols installed as per quasigod. Not sure if that helps troubleshoot. Is there a different font family property value I could try?

Run fc-list | grep Nerd to make sure the font is showing up. Maybe also try putting it first in the list. It shouldn’t interfere with anything, since it only contains symbols.

This returns an enormous list. Here is a tiny sample:

Sample $ fc-list | grep Nerd
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSerifNerdFont-ExtraCondensedBlack.ttf: NotoSerif Nerd Font,NotoSerif NF,NotoSerif NF ExtCond Black:style=ExtraCondensed Black,Regular
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansMNerdFont-ExtraCondensedMedium.ttf: NotoSansM Nerd Font,NotoSansM NF,NotoSansM NF ExtCond Med:style=ExtraCondensed Medium,Regular
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansMNerdFont-ExtraBold.ttf: NotoSansM Nerd Font,NotoSansM NF,NotoSansM NF ExtBd:style=ExtraBold,Regular
/nix/store/dk96paklwbkvxcjpjq4h73b3kvhdqar3-nerd-fonts-mplus-3.3.0+2023-09/share/fonts/truetype/NerdFonts/M+/M+1NerdFontPropo-Black.ttf: M+1 Nerd Font Propo,M+1 Nerd Font Propo Black:style=Black,Regular
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSerifNerdFontPropo-SemiCondensedSemiBold.ttf: NotoSerif Nerd Font Propo,NotoSerif NFP,NotoSerif NFP SemCond SemBd:style=SemiCondensed SemiBold,Regular
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFont-ExtraCondensedLightItalic.ttf: NotoSans Nerd Font,NotoSans NF,NotoSans NF ExtCond Light:style=ExtraCondensed Light Italic,Italic
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFontPropo-ExtraCondensedBlackItalic.ttf: NotoSans Nerd Font Propo,NotoSans NFP,NotoSans NFP ExtCond Black:style=ExtraCondensed Black Italic,Italic
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFontPropo-BoldItalic.ttf: NotoSans Nerd Font Propo,NotoSans NFP:style=Bold Italic
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansMNerdFontMono-CondensedThin.ttf: NotoSansM Nerd Font Mono,NotoSansM NFM,NotoSansM NFM Cond Thin:style=Condensed Thin,Regular
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFont-SemiCondensedLightItalic.ttf: NotoSans Nerd Font,NotoSans NF,NotoSans NF SemCond Light:style=SemiCondensed Light Italic,Italic
/nix/store/dk96paklwbkvxcjpjq4h73b3kvhdqar3-nerd-fonts-mplus-3.3.0+2023-09/share/fonts/truetype/NerdFonts/M+/M+2NerdFontPropo-Bold.ttf: M+2 Nerd Font Propo:style=Bold
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSerifNerdFont-CondensedLight.ttf: NotoSerif Nerd Font,NotoSerif NF,NotoSerif NF Cond Light:style=Condensed Light,Regular
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFontPropo-SemiCondensedBoldItalic.ttf: NotoSans Nerd Font Propo,NotoSans NFP,NotoSans NFP SemCond:style=SemiCondensed Bold Italic,Bold Italic
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFontPropo-Italic.ttf: NotoSans Nerd Font Propo,NotoSans NFP:style=Italic
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFont-CondensedBoldItalic.ttf: NotoSans Nerd Font,NotoSans NF,NotoSans NF Cond:style=Condensed Bold Italic,Bold Italic
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSerifNerdFont-ExtraCondensedItalic.ttf: NotoSerif Nerd Font,NotoSerif NF,NotoSerif NF ExtCond:style=ExtraCondensed Italic,Italic
/nix/store/dk96paklwbkvxcjpjq4h73b3kvhdqar3-nerd-fonts-mplus-3.3.0+2023-09/share/fonts/truetype/NerdFonts/M+/M+1CodeNerdFontPropo-SemiBold.ttf: M+1Code Nerd Font Propo,M+1Code Nerd Font Propo SemBd:style=SemiBold,Regular
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFont-ExtraCondensedSemiBold.ttf: NotoSans Nerd Font,NotoSans NF,NotoSans NF ExtCond SemBd:style=ExtraCondensed SemiBold,Regular
/nix/store/dyfpzg2p0nqg6ymd9avnl9mf01b175d6-nerd-fonts-noto-3.3.0/share/fonts/truetype/NerdFonts/Noto/NotoSansNerdFontPropo-BlackItalic.ttf: NotoSans Nerd Font Propo,NotoSans NFP,NotoSans NFP Black:style=Black Italic,Italic

I experimented by grep’ing for Symbols too just to see:

$ fc-list | grep Symbols
/nix/store/yq8vbyfnh5n4ybpn7zhj0fdjn9hqvqg3-nerd-fonts-symbols-only-3.3.0/share/fonts/truetype/NerdFonts/Symbols/SymbolsNerdFont-Regular.ttf: Symbols Nerd Font:style=Regular
/nix/store/yq8vbyfnh5n4ybpn7zhj0fdjn9hqvqg3-nerd-fonts-symbols-only-3.3.0/share/fonts/truetype/NerdFonts/Symbols/SymbolsNerdFontMono-Regular.ttf: Symbols Nerd Font Mono:style=Regular

That confirms they are installed and in effect, right?

yeah, that’s the same info I see in my output, which has them working. Do the symbols work as expected when entered in your terminal?

Here is a screenshot of nerd fonts website for all their bluetooth symbols. I copied three different ones and pasted them into my gnome-terminal successfully (couldn’t figure out how to paste them into kitty). So it works.

When was this waybar config created? I took a look at your modules file and a decent chunk of the icons are outdated, which can be fixed using nerdfix. Some are still incorrect after doing this, I would try replacing those ones by pasting them from here: Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher.

1 Like

The timestamp on the release for the Waybar module file in the tarball that I downloaded shows: October 15, 2024. I got it from a brilliant digital creator named Aditya Shakya which I paid a small fee on ko-fi. The community Wiki for this sub-project I am very familiar with. It’s not too long and is instructive. There is an official Discord server for users to support each other as well. I raised this issue there and no one else seems to experience it, even other NixOS users.

This is a nifty tool. I installed it. When I run $ nerdfix check modules inside the Waybar config directory, nerdfix automatically highlights and therefore confirms all the outdated symbols. That makes sense. But the weird thing next is when I do exactly as the nerdfix README.md says and run $ nerdfix fix --write --select-first modules, when I execute that command, the shell prompt does nothing:

$ nerdfix fix --write --select-first ~/dotfiles/hypr/.config/hypr/waybar/modules
$  

When I run the check again, nerdfix continues to point out all the problematic symbols, as if nothing has changed. I wonder what I am missing. Thoughts?

Weird, that’s happening for me too. There must be something wrong with nerdfix, last time I used it that command worked as expected. Maybe look for another script that can fix them, there were a few floating around when Nerd Fonts updated their icons.