@@ -116,7 +116,7 @@ let
116116 defaultFontsConf =
117117 let genDefault = fonts: name:
118118 optionalString (fonts != []) ''
119− <alias>
119+ <alias binding="same">
120120 <family>${name}</family>
121121 <prefer>
122122 ${concatStringsSep ""
@@ -139,6 +139,8 @@ let
139139
140140 ${genDefault cfg.defaultFonts.monospace "monospace"}
141141
142+ ${genDefault cfg.defaultFonts.emoji "emoji"}
143+
142144 </fontconfig>
143145 '';
144146
@@ -344,6 +346,21 @@ in
344346 in case multiple languages must be supported.
345347 '';
346348 };
349+
350+ emoji = mkOption {
351+ type = types.listOf types.str;
352+ default = ["Noto Color Emoji"];
353+ description = ''
354+ System-wide default emoji font(s). Multiple fonts may be listed
355+ in case a font does not support all emoji.
356+
357+ Note that fontconfig matches color emoji fonts preferentially,
358+ so if you want to use a black and white font while having
359+ a color font installed (eg. Noto Color Emoji installed alongside
360+ Noto Emoji), fontconfig will still choose the color font even
361+ when it is later in the list.
362+ '';
363+ };
347364 };
348365
349366 hinting = {