diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-09-01 03:58:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-01 03:58:27 -0400 |
commit | 83d60f72ae5a0f45da8d3bde0e3273f91dcffbf7 (patch) | |
tree | 52a12ff0c92e652de4dfc422de9b2ee86eea3b97 /nixos/modules | |
parent | 7d5375ebf4cd417465327d7ab453687fd19663c9 (diff) | |
parent | fcec3ff0dcb31dec83ee863273a8b0ee6261e386 (diff) | |
download | nixlib-83d60f72ae5a0f45da8d3bde0e3273f91dcffbf7.tar nixlib-83d60f72ae5a0f45da8d3bde0e3273f91dcffbf7.tar.gz nixlib-83d60f72ae5a0f45da8d3bde0e3273f91dcffbf7.tar.bz2 nixlib-83d60f72ae5a0f45da8d3bde0e3273f91dcffbf7.tar.lz nixlib-83d60f72ae5a0f45da8d3bde0e3273f91dcffbf7.tar.xz nixlib-83d60f72ae5a0f45da8d3bde0e3273f91dcffbf7.tar.zst nixlib-83d60f72ae5a0f45da8d3bde0e3273f91dcffbf7.zip |
Merge pull request #67667 from jtojnar/default-emoji
nixos/fontconfig: Allow setting default emoji font
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/config/fonts/fontconfig.nix | 19 | ||||
-rw-r--r-- | nixos/modules/config/fonts/fonts.nix | 1 |
2 files changed, 19 insertions, 1 deletions
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index fe0b88cf4c26..bcb86f11ead7 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -116,7 +116,7 @@ let defaultFontsConf = let genDefault = fonts: name: optionalString (fonts != []) '' - <alias> + <alias binding="same"> <family>${name}</family> <prefer> ${concatStringsSep "" @@ -139,6 +139,8 @@ let ${genDefault cfg.defaultFonts.monospace "monospace"} + ${genDefault cfg.defaultFonts.emoji "emoji"} + </fontconfig> ''; @@ -344,6 +346,21 @@ in in case multiple languages must be supported. ''; }; + + emoji = mkOption { + type = types.listOf types.str; + default = ["Noto Color Emoji"]; + description = '' + System-wide default emoji font(s). Multiple fonts may be listed + in case a font does not support all emoji. + + Note that fontconfig matches color emoji fonts preferentially, + so if you want to use a black and white font while having + a color font installed (eg. Noto Color Emoji installed alongside + Noto Emoji), fontconfig will still choose the color font even + when it is later in the list. + ''; + }; }; hinting = { diff --git a/nixos/modules/config/fonts/fonts.nix b/nixos/modules/config/fonts/fonts.nix index 0dd01df9da74..abb806b601a7 100644 --- a/nixos/modules/config/fonts/fonts.nix +++ b/nixos/modules/config/fonts/fonts.nix @@ -43,6 +43,7 @@ with lib; pkgs.xorg.fontmiscmisc pkgs.xorg.fontcursormisc pkgs.unifont + pkgs.noto-fonts-emoji ]; }; |