Skip to content

fonts

The fonts module can be used to install fonts from Nerd Fonts, Google Fonts, or arbitrary URLs. This module will always download the latest version of a font and properly configure it.

  • Nerd Fonts: Install any font from the Nerd Fonts collection
  • Google Fonts: Install any font from Google Fonts
  • URL Fonts: Install fonts from custom URLs (ZIP archives, individual font files, etc.)
type: fonts
fonts:
nerd-fonts:
- FiraCode # don't add spaces or "Nerd Font" suffix
- Hack
- SourceCodePro
- Terminus
- JetBrainsMono
- NerdFontsSymbolsOnly
google-fonts:
- Roboto
- Open Sans
- Inter
url-fonts:
- name: CustomFont
url: https://example.com/my-font.otf
- name: CompanyFonts
url: https://company.com/fonts.tar.gz
  • Downloads from the official Nerd Fonts releases
  • Includes programming ligatures and thousands of glyphs/icons
  • Perfect for terminal and code editor use
  • Downloads from Google Fonts
  • High-quality web and print fonts
  • Automatically fetches the latest versions
  • Download fonts from any public URL
  • Supports multiple archive formats: .zip, .tar.gz, .tar.bz2, .tgz
  • Supports individual font files: .otf, .ttf
  • Each font is organized in its own subdirectory based on the name you specify

Individual Font File:

url-fonts:
- name: MyFont
url: https://example.com/MyFont-Regular.otf

Corporate/Licensed Fonts from ZIP Archive:

url-fonts:
- name: CompanyBrand
url: https://assets.company.com/fonts/brand-fonts.zip

Multiple Fonts from GitHub Releases:

url-fonts:
- name: SpecialFont
url: https://github.com/user/repo/releases/download/v1.0/font.tar.gz
- name: AnotherFont
url: https://github.com/user/repo/releases/download/v2.0/font.zip

Fonts are installed to:

  • Nerd Fonts: /usr/share/fonts/nerd-fonts/
  • Google Fonts: /usr/share/fonts/google-fonts/
  • URL Fonts: /usr/share/fonts/url-fonts/
  • All fonts are automatically registered with the system font cache (fc-cache)
  • URL fonts are organized by the name you specify
  • Archives are automatically extracted and only font files (.otf, .ttf) are kept
  • Font downloads are cached during the build process for efficiency
  • Ensure URLs are publicly accessible (no authentication required)
  • For ZIP files, font files can be in subdirectories - they’ll be found automatically
  • Use descriptive names for URL fonts to avoid conflicts
  • Check that your font URLs return the expected file format
type: fonts
fonts:
nerd-fonts:
- FiraCode # don't add spaces or "Nerd Font" suffix.
- Hack
- SourceCodePro
- Terminus
- JetBrainsMono
- NerdFontsSymbolsOnly
google-fonts:
- Roboto
- Open Sans
url-fonts:
- name: CustomFont
url: https://example.com/my-font.otf
- name: CompanyFonts
url: https://company.com/fonts.zip

object

array of string

List of Nerd Fonts to install (without the “Nerd Font” suffix).

array of string

List of Google Fonts to install.

array of object

string

Name for the font (will be used as directory name).

string

URL to download the font from (supports .otf, .ttf files and archives).

List of custom URL fonts to install.

No description provided…