When you set up a system, you get everything served on a plate, including fonts. That is way to easy for the cool kid you are, right?
Ok, since you say so, here is how o find more fonts than the standard choices.
The easiest way to find fonts is to use the [[https://search.nixos.org/packages][NixOS packages site]] to insert new fonts. On that site, write the name of the font you need or just fonts and take your pick. Watch out, some packages are toolkits for fonts, rather than fonts.
The list of font packages numbers 173 at the time of writing this. You pick the fonts by adding them in a configuration file, which one will vary depending on if you are running NixOS or the Nix package manager or if you create a Flake or module.
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts
dina-font
proggyfonts
];
And if you want to be more picky, for whatever reason, you can pick only some fonts in a pack. Like this:
fonts.fonts = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
];
Once installed, you need to make the fonts available to the system applications in a separate part of the configuration.
#----=[ Fonts ]=----#
fonts = {
enableDefaultFonts = true;
fonts = with pkgs; [
pkgs.ubuntu_font_family
# Persian Fonts
pkgs.vazir-fonts
pkgs.vazir-code-font
];
fontconfig = {
penultimate.enable = false;
defaultFonts = {
serif = [ "Vazir" "Ubuntu" ];
sansSerif = [ "Vazir" "Ubuntu" ];
monospace = [ "Vazir Code" "Ubuntu" ];
};
};
};
This is the default method if you only use what the NixOS project has already packaged.
To pick any font, is another story! For a later date!
Greetings…