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:
parent
f3c32cb2c1
commit
5b5c2fb9c0
|
@ -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
|
||||
|
|
|
@ -654,6 +654,8 @@ in
|
|||
${xrandrMonitorSections}
|
||||
'';
|
||||
|
||||
fonts.enableDefaultFonts = mkDefault true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue