3
0
Fork 0
forked from mirrors/nixpkgs

Make the default fonts conditional on services.xserver.enable

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.
This commit is contained in:
Eelco Dolstra 2016-09-05 15:48:48 +02:00
parent f3c32cb2c1
commit 5b5c2fb9c0
2 changed files with 13 additions and 1 deletions

View file

@ -11,17 +11,27 @@ with lib;
# 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 =
fonts.fonts = mkIf config.fonts.enableDefaultFonts
[
pkgs.xorg.fontbhlucidatypewriter100dpi
pkgs.xorg.fontbhlucidatypewriter75dpi

View file

@ -654,6 +654,8 @@ in
${xrandrMonitorSections}
'';
fonts.enableDefaultFonts = mkDefault true;
};
}