If I try something like
nix-env --install nixpkgs.fira-code
the package will be installed but the font will not be available anywhere.
How do I install fonts and make them available for use in Ubuntu using Nix?
If I try something like
nix-env --install nixpkgs.fira-code
the package will be installed but the font will not be available anywhere.
How do I install fonts and make them available for use in Ubuntu using Nix?
I had the same question, and asked it in the NixOS Discourse. The solution is to manually add Nix's font directory to the user's fontconfig (as described here), like this:
Create the local fontconfig directory:
$ mkdir -p ~/.config/fontconfig/conf.d/
Create a file in that directory (called, for example, 10-nix-fonts.conf
) specifying where to locate the Nix fonts:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>~/.nix-profile/share/fonts/</dir>
</fontconfig>