I had the same issue when I was setting up waybar, and I, too, found that I needed to follow the good wiki link that @Umm posted.
Then I switched to a home-manager solution for fonts: fonts.fontconfig.enable
. If set to true
, then any font packages (such as font-awesome
) that you put in home.packages will just work, and should appear in $HOME/.nix-profile/share/fonts/
My fonts config nix file:
{
pkgs,
...
}: {
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
fira-code
fira-code-symbols
font-awesome
liberation_ttf
mplus-outline-fonts.githubRelease
nerdfonts
noto-fonts
noto-fonts-emoji
proggyfonts
];
}
Also, unsure if this is necessary, but to be explicit, specifying the fonts in programs.waybar.style
may help. For instance, something like:
font-family: "Arimo Nerd Font", "Font Awesome 6 Free";
And, of course, if you just use glyphs from your primary font (in my case, Arimo Nerd Font), then Font Awesome is not necessary at all. In other words, choose whichever fonts work for you.