Fonts: Difference between revisions

imported>Extends
mNo edit summary
imported>Extends
Integrated the option to use to download only certain fonts from nerdfonts repository on unstable.
Line 23: Line 23:


=== Installing specific fonts from nerdfonts ===
=== Installing specific fonts from nerdfonts ===
You probably want to install some fonts from nerdfonts repository and not the entiere repository (take much time to install all the fonts). To achieve that, you can use an overlay created by [https://github.com/lightdiscord/nix-nerd-fonts-overlay# LightDiscord]. Here is an example of how to use it:
You probably want to install some fonts from nerdfonts repository and not the entiere repository (take much time to install all the fonts). To achieve that on stable 20.03, you can use an overlay created by [https://github.com/lightdiscord/nix-nerd-fonts-overlay# LightDiscord]. Here is an example of how to use it:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
{ pkgs, ... }:
{ pkgs, ... }:
Line 37: Line 37:


This will cause NixOS to download only fira code, jetbrains mono and droid sans mono fonts from nerd-fonts instead of the whole package.
This will cause NixOS to download only fira code, jetbrains mono and droid sans mono fonts from nerd-fonts instead of the whole package.
On unstable however, there's a built-in option that looks like that :
<syntaxhighlight lang="nix">
{ pkgs, ... }:
{
  fonts.fonts = with pkgs; [
    nerdfonts.override {
      fonts = [ "FiraCode" "DroidSansMono" ];
    }
  ];
}
</syntaxhighlight>
This will cause NixOS to download only fira code and droid sans mono fonts from nerd-fonts instead of the whole package.


=== Imperative installation of user fonts ===
=== Imperative installation of user fonts ===