Fonts: Difference between revisions

Nerd fonts: update to 25.05.
m make it clearer what nix-instantiate is doing to filter out the nerdfonts
 
Line 33: Line 33:
Individual Nerd Fonts can be installed like so:
Individual Nerd Fonts can be installed like so:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">fonts.packages = with pkgs; [
fonts.packages = with pkgs; [
   nerd-fonts.fira-code
   nerd-fonts.fira-code
   nerd-fonts.droid-sans-mono
   nerd-fonts.droid-sans-mono
];
];</syntaxhighlight>
</syntaxhighlight>


The available Nerd Font subpackages can be listed by searching for {{nixos:package|nerd-fonts.*}} on the [[Searching packages|NixOS Package Search]] or by running the following command: <pre>nix-instantiate --eval --expr "builtins.filter (font: font != \"override\" && font != \"overrideDerivation\" && font != \"recurseForDerivations\") (builtins.attrNames (import <nixpkgs> {}).nerd-fonts)"</pre>
The available Nerd Font subpackages can be listed by searching for {{nixos:package|nerd-fonts.*}} on the [[Searching packages|NixOS Package Search]] or by running the following command: <pre>nix-instantiate --eval --expr "with (import <nixpkgs> {}); lib.attrNames (lib.filterAttrs (_: lib.isDerivation) nerd-fonts)"</pre>


==== Installing all <code>nerdfonts</code> ====
==== Installing all <code>nerdfonts</code> ====