Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

fonts.fontconfig.enable

Whether to enable fontconfig configuration. This will, for example, allow fontconfig to discover fonts and configurations installed through home.packages and nix-env.

If Home Manager is installed as a NixOS submodule and home-manager.useUserPackages is enabled, this option defaults to the value of NixOS’ fonts.fontconfig.enable.

Type: boolean

Default:

nixosConfig != null
&& nixosConfig.home-manager.useUserPackages
&& nixosConfig.fonts.fontconfig.enable;

Declared by:

fonts.fontconfig.antialiasing

Whether to enable font antialiasing.

Type: null or boolean

Default:

null

Example:

true

Declared by:

fonts.fontconfig.configFile

Config files that will be installed to ~/.config/fontconfig/conf.d/.

Type: attribute set of (submodule)

Default:

{ }

Example:

{
  commit-mono-options = {
    enable = true;
    priority = 80;
    source = "./resources/fontconfig/commit-mono.conf";
  };
  tamzen-disable-antialiasing = {
    enable = true;
    priority = 90;
    text = ''
      <?xml version="1.0"?>
      <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
      
      <fontconfig>
        <description>Disable anti-aliasing for Tamzen since it is a bitmap font</description>
        <match target="pattern">
          <test name="family" compare="eq" qual="any">
            <string>Tamzen</string>
          </test>
          <edit name="antialias" mode="assign">
            <bool>false</bool>
          </edit>
        </match>
      </fontconfig>
    '';
  };
}

Declared by:

fonts.fontconfig.configFile.<name>.enable

Whether this file should be generated. This option allows specific files to be disabled.

Type: boolean

Default:

if lib.versionAtLeast config.home.stateVersion "26.11" then true else false

Declared by:

fonts.fontconfig.configFile.<name>.label

Label to use for the name of the config file.

Type: string

Default:

<name>

Declared by:

fonts.fontconfig.configFile.<name>.priority

Determines the order in which configuration files are loaded.

Must be a value within the range of 0-99, where priority 0 is the highest priority and 99 is the lowest.

Type: integer between 0 and 99 (both inclusive)

Default:

90

Declared by:

fonts.fontconfig.configFile.<name>.settings

Structured attrs of settings in the format of pkgs.format.xml {}. The settings are implicitly wrapped inside the <fontconfig> tag, i.e. as { fontconfig = <settings>; }. Note that source will be derived from settings and text if they are set; with override priorities being preserved. As a consequence, exactly one of settings, text, and source must be set with highest priority.

Type: XML value

Default:

{ }

Example:

{
  description = "Enable antialiasing";
  match = {
    "@target" = "font";
    edit = {
      "@mode" = "assign";
      "@name" = "antialias";
      bool = "true";
    };
  };
}

Declared by:

fonts.fontconfig.configFile.<name>.source

Path to the source file. Note that source will be derived from settings and text if they are set; with override priorities being preserved. As a consequence, exactly one of settings, text, and source must be set with highest priority.

Type: absolute path or (null or absolute path) convertible to it

Declared by:

fonts.fontconfig.configFile.<name>.target

Path to the target file relative to ${config.xdg.configHome}/fontconfig/conf.d/.

Type: non-empty string

Default:

"\"\${toString config.priority}-hm-\${config.label}.conf\""

Declared by:

fonts.fontconfig.configFile.<name>.text

Verbatim contents of the config file. Note that source will be derived from settings and text if they are set; with override priorities being preserved. As a consequence, exactly one of settings, text, and source must be set with highest priority.

Type: null or strings concatenated with “\n”

Default:

null

Declared by:

fonts.fontconfig.defaultFonts.emoji

Per-user 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.

Type: list of string

Default:

[ ]

Declared by:

fonts.fontconfig.defaultFonts.monospace

Per-user default monospace font(s). Multiple fonts may be listed in case multiple languages must be supported.

Type: list of string

Default:

[ ]

Declared by:

fonts.fontconfig.defaultFonts.sansSerif

Per-user default sans serif font(s). Multiple fonts may be listed in case multiple languages must be supported.

Type: list of string

Default:

[ ]

Declared by:

fonts.fontconfig.defaultFonts.serif

Per-user default serif font(s). Multiple fonts may be listed in case multiple languages must be supported.

Type: list of string

Default:

[ ]

Declared by:

fonts.fontconfig.hinting

The font hinting mode.

Type: null or one of “none”, “slight”, “medium”, “full”

Default:

null

Example:

"slight"

Declared by:

fonts.fontconfig.subpixelRendering

The sub-pixel rendering mode.

Type: null or one of “none”, “rgb”, “bgr”, “vertical-rgb”, “vertical-bgr”

Default:

null

Example:

"rgb"

Declared by: