let
  configFile = "home-files/.config/fontconfig/conf.d/52-hm-default-fonts.conf";
in
{
  fonts.fontconfig = {
    enable = true;
    defaultFonts = {
      sansSerif = [
        "A"
        "B"
      ];
      emoji = [ "C" ];
    };
  };

  nmt.script = ''
    assertFileExists ${configFile}
    assertFileContent ${configFile} ${builtins.toFile "fonts.conf" ''
      <?xml version='1.0'?>

      <!-- Generated by Home Manager. -->

      <!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
      <fontconfig>
      <!-- Default fonts -->
      <alias binding="same">
        <family>sans-serif</family>
        <prefer>
        <family>A</family>
      <family>B</family>

        </prefer>
      </alias>



      <alias binding="same">
        <family>emoji</family>
        <prefer>
        <family>C</family>

        </prefer>
      </alias>


      </fontconfig>
    ''}
  '';
}
