{
  fonts.fontconfig = {
    enable = true;
    antialiasing = false;
    hinting = "none";
    subpixelRendering = "vertical-bgr";
  };

  nmt.script =
    let
      configFile = "home-files/.config/fontconfig/conf.d/10-hm-rendering.conf";
    in
    ''
      assertFileExists ${configFile}
      assertFileContent ${configFile} ${builtins.toFile "rendering.conf" ''
        <?xml version='1.0'?>

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

        <!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
        <fontconfig>
        <description>Set the rendering mode</description>
        <match target="font">
          <edit mode="assign" name="antialias">
            <bool>false</bool>
          </edit>
        </match>
        <match target="font">
          <edit mode="assign" name="hinting">
            <bool>true</bool>
          </edit>
        </match>
        <match target="font">
          <edit mode="assign" name="hintstyle">
            <const>hintnone</const>
          </edit>
        </match>
        <match target="font">
          <edit mode="assign" name="rgba">
            <const>vbgr</const>
          </edit>
        </match>

        </fontconfig>
      ''}
    '';
}
