Fonts: Difference between revisions

Document the two fonts. shorthands
Line 1: Line 1:
NixOS handles fonts like it handles many different parts of the system: they are not in the environment unless installed.
== Installing fonts on NixOS ==
== Installing fonts on NixOS ==


Line 24: Line 26:


Be aware that sometimes font names and packages name differ and there is no universal convention in NixOS. See [https://discourse.nixos.org/t/guidelines-on-packaging-fonts/7683/2 Guidelines for font packaging]
Be aware that sometimes font names and packages name differ and there is no universal convention in NixOS. See [https://discourse.nixos.org/t/guidelines-on-packaging-fonts/7683/2 Guidelines for font packaging]
=== Shorthands for fonts ===
* <code>fonts.enableDefaultPackages</code>: when set to <code>true</code>, causes some "basic" fonts to be installed for reasonable Unicode coverage. Set to <code>true</code> if you are unsure about what languages you might end up reading.
* <code>fonts.enableGhostscriptFonts</code>: affects the <code>ghostscript</code> package. Ghostscript packages some URW fonts for the standard PostScript typefaces. If <code>true</code>, these fonts will be visible to GUI applications. You could set it to <code>true</code> if you want these fonts, but <code>gyre-fonts</code> (part of <code>fonts.enableDefaultPackages</code>) might be higher-quality depending on your judgement.
=== Installing specific fonts from nerdfonts ===
=== Installing specific fonts from nerdfonts ===
The <code>nerdfonts</code> package, which contains all fonts from the [https://www.nerdfonts.com/ nerdfonts] repository is quite large and contains a large number of fonts which take some time to install. If you only need a selection of fonts from the package, you can overwrite the font selection on Stable 20.09 like so:
The <code>nerdfonts</code> package, which contains all fonts from the [https://www.nerdfonts.com/ nerdfonts] repository is quite large and contains a large number of fonts which take some time to install. If you only need a selection of fonts from the package, you can overwrite the font selection on Stable 20.09 like so: