5b5c2fb9c0
We were pulling in 44 MiB of fonts in the default configuration, which is a bit excessive for headless configurations like EC2 instances. Note that dejavu_minimal ensures that remote X11-forwarded applications still have a basic font regardless.
49 lines
983 B
Nix
49 lines
983 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
fonts = {
|
|
|
|
# TODO: find another name for it.
|
|
fonts = mkOption {
|
|
type = types.listOf types.path;
|
|
default = [];
|
|
example = literalExample "[ pkgs.dejavu_fonts ]";
|
|
description = "List of primary font paths.";
|
|
};
|
|
|
|
enableDefaultFonts = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = ''
|
|
Enable a basic set of fonts providing several font styles
|
|
and families and reasonable coverage of Unicode.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = {
|
|
|
|
fonts.fonts = mkIf config.fonts.enableDefaultFonts
|
|
[
|
|
pkgs.xorg.fontbhlucidatypewriter100dpi
|
|
pkgs.xorg.fontbhlucidatypewriter75dpi
|
|
pkgs.dejavu_fonts
|
|
pkgs.freefont_ttf
|
|
pkgs.liberation_ttf
|
|
pkgs.xorg.fontbh100dpi
|
|
pkgs.xorg.fontmiscmisc
|
|
pkgs.xorg.fontcursormisc
|
|
pkgs.unifont
|
|
];
|
|
|
|
};
|
|
|
|
}
|