Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattpetters/nix-font-installer
Easy to use script to add a custom font or fonts to the nix font cache
https://github.com/mattpetters/nix-font-installer
font-installer fonts nix nix-tools nixos
Last synced: 24 days ago
JSON representation
Easy to use script to add a custom font or fonts to the nix font cache
- Host: GitHub
- URL: https://github.com/mattpetters/nix-font-installer
- Owner: mattpetters
- Created: 2024-09-15T21:10:09.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-09-15T21:11:53.000Z (about 2 months ago)
- Last Synced: 2024-09-30T07:23:25.075Z (about 1 month ago)
- Topics: font-installer, fonts, nix, nix-tools, nixos
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nix Font Installer
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.
## Features
- 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## Installation
1. Clone this repository:
```
git clone https://github.com/mattpetters/nix-font-installer.git
```## Usage
### Installing a single font file:
```
./nix-font-installer.sh "My Custom Font" /path/to/font.ttf
```### Installing multiple fonts from a directory:
```
./nix-font-installer.sh "My Font Collection" /path/to/font/directory
```## How It Works
1. The script creates a temporary Nix expression to package the font(s).
2. It copies the specified font file(s) to a temporary directory.
3. The Nix expression is evaluated and the fonts are installed into your Nix profile.
4. The font cache is updated to make the new fonts immediately available.
5. The script verifies the installation by listing the newly installed fonts.## Requirements
- Nix package manager
- `fc-cache` (usually comes pre-installed on most systems)## License
Distributed under the MIT License. See `LICENSE` file for more information.
## Contact
[@mattpetters_](https://x.com/mattpetters_)