From 52bc80c38708089de7e6a35c2e169371e4767d4e Mon Sep 17 00:00:00 2001 From: janabhumi Date: Wed, 21 Sep 2022 08:08:52 +0300 Subject: [PATCH] system/fonts: fix emoji priority --- home/progs/alacritty/config.nix | 24 +++++++----------------- system/configuration.nix | 27 +++++++++++++++++++++------ 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/home/progs/alacritty/config.nix b/home/progs/alacritty/config.nix index 3ec1a01..7833e6b 100644 --- a/home/progs/alacritty/config.nix +++ b/home/progs/alacritty/config.nix @@ -20,25 +20,15 @@ font = let - family = "Fira Code"; + family = "monospace"; + + mkFont = style: { inherit family style; }; in { - normal = { - inherit family; - style = "Regular"; - }; - bold = { - inherit family; - style = "Bold"; - }; - italic = { - inherit family; - style = "Italic"; - }; - bold_italic = { - inherit family; - style = "Bold Italic"; - }; + normal = mkFont "Regular"; + bold = mkFont "Bold"; + italic = mkFont "Italic"; + bold_italic = mkFont "Bold Italic"; size = 11.0; }; diff --git a/system/configuration.nix b/system/configuration.nix index d243732..6a68064 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -23,12 +23,27 @@ in # Set your time zone. time.timeZone = "Europe/Moscow"; - fonts.fonts = with pkgs; [ - ubuntu_font_family - fira-code - fira-code-symbols - (nerdfonts.override { fonts = [ "FiraCode" ]; }) - ]; + fonts = { + enableDefaultFonts = true; + fonts = with pkgs; [ + ubuntu_font_family + fira-code + fira-code-symbols + (nerdfonts.override { fonts = [ "FiraCode" ]; }) + ]; + fontconfig = { + defaultFonts = { + monospace = [ + "Fira Code" + "FireCode Nerd Font Mono" + "emoji" + ]; + serif = [ "Ubuntu" "emoji" ]; + sansSerif = [ "Ubuntu" "emoji" ]; + emoji = [ "Noto Color Emoji" "Noto Emoji" ]; + }; + }; + }; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/";