1{ lib, ... }:
2{
3 name = "fontconfig-default-fonts";
4
5 meta.maintainers = with lib.maintainers; [
6 jtojnar
7 ];
8
9 nodes.machine =
10 { config, pkgs, ... }:
11 {
12 fonts.enableDefaultPackages = true; # Background fonts
13 fonts.packages = with pkgs; [
14 noto-fonts-color-emoji
15 cantarell-fonts
16 twitter-color-emoji
17 source-code-pro
18 gentium
19 ];
20 fonts.fontconfig.defaultFonts = {
21 serif = [ "Gentium" ];
22 sansSerif = [ "Cantarell" ];
23 monospace = [ "Source Code Pro" ];
24 emoji = [ "Twitter Color Emoji" ];
25 };
26 };
27
28 testScript = ''
29 machine.succeed("fc-match serif | grep '\"Gentium\"'")
30 machine.succeed("fc-match sans-serif | grep '\"Cantarell\"'")
31 machine.succeed("fc-match monospace | grep '\"Source Code Pro\"'")
32 machine.succeed("fc-match emoji | grep '\"Twitter Color Emoji\"'")
33 '';
34}