A flexible and easy-to-use script for installing local fonts in Nix environments. This script supports both individual font files and directories containing multiple fonts.
- Install single font files or entire directories of fonts
- Supports both .ttf and .otf font formats
- Automatically updates font cache after installation
- Verifies successful font installation
- Compatible with NixOS and other Nix-based systems
- Clone this repository:
git clone https://github.com/mattpetters/nix-font-installer.git
./nix-font-installer.sh "My Custom Font" /path/to/font.ttf
./nix-font-installer.sh "My Font Collection" /path/to/font/directory
- The script creates a temporary Nix expression to package the font(s).
- It copies the specified font file(s) to a temporary directory.
- The Nix expression is evaluated and the fonts are installed into your Nix profile.
- The font cache is updated to make the new fonts immediately available.
- The script verifies the installation by listing the newly installed fonts.
- Nix package manager
fc-cache(usually comes pre-installed on most systems)
Distributed under the MIT License. See LICENSE file for more information.