Member-only story
NixOS #Beginner
How to Easily Install and Configure Fonts on NixOS?
Quick Guide: Installing and Setting Up Fonts on NixOS.
NixOS is an open-source declarative configuration system, and it is based on the Nix package manager.
NixOS has recently gained popularity. In this tutorial, I will teach you how to add a new font to NixOS.
Adding fonts package in your environment.systemPackages
and
users.users.<name>.packages
option, it won’t make the fonts accessible by applications. To achieve that, you need to put font packages in the fonts.packages
NixOS option.
The fonts.packages
option helps you to install additional or new fonts in NixOS and configure them in the configuration.nix
file.
# configuration.nix
fonts = {
...
};
# It doesn't work
environment.systemPackages = with pkgs; [ noto-fonts ];
NixOS has multiple font options, but this article focuses on only three, which are important for advanced configuration; check out the NixOS font docs.
# configuration.nix
fonts = {
enableDefaultPackages = true;
packages = [];
fontconfig = {
fontconfig.enable = true;
defaultFonts.emoji = [];
}
}