Fonts: Difference between revisions

imported>L0b0
Fix option name
imported>Hypnosis2839
replace fonts.fonts with fonts.packages
Line 3: Line 3:
NixOS has many font packages available, and you can easily search for your favourites on the [https://search.nixos.org/packages NixOS packages site].  
NixOS has many font packages available, and you can easily search for your favourites on the [https://search.nixos.org/packages NixOS packages site].  


Despite looking like normal packages, simply adding these font packages to your <code>environment.systemPackages</code> won't make the fonts accessible to applications. To achieve that, put these packages in the <code>[https://search.nixos.org/options/?query=fonts.fonts fonts.fonts]</code> NixOS options list instead.
Despite looking like normal packages, simply adding these font packages to your <code>environment.systemPackages</code> won't make the fonts accessible to applications. To achieve that, put these packages in the <code>[https://search.nixos.org/options/?query=fonts.packages fonts.packages]</code> NixOS options list instead.


'''Note''': for 23.05 or older, <code>fonts.packages</code> is called <code>fonts.fonts</code> instead.


For example:  
For example:  


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
   noto-fonts
   noto-fonts
   noto-fonts-cjk
   noto-fonts-cjk