2014-04-14 07:26:48 -07:00
|
|
|
{ config, lib, pkgs, ... }:
|
2013-06-27 04:12:45 -07:00
|
|
|
|
2014-04-14 07:26:48 -07:00
|
|
|
with lib;
|
2013-06-27 04:12:45 -07:00
|
|
|
|
|
|
|
{
|
2019-12-09 17:51:19 -08:00
|
|
|
imports = [
|
|
|
|
(mkRemovedOptionModule [ "fonts" "enableCoreFonts" ] "Use fonts.fonts = [ pkgs.corefonts ]; instead.")
|
|
|
|
];
|
2013-06-27 04:12:45 -07:00
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
fonts = {
|
|
|
|
|
|
|
|
# TODO: find another name for it.
|
|
|
|
fonts = mkOption {
|
2014-05-22 05:20:03 -07:00
|
|
|
type = types.listOf types.path;
|
2016-09-05 06:48:48 -07:00
|
|
|
default = [];
|
2014-08-27 14:41:15 -07:00
|
|
|
example = literalExample "[ pkgs.dejavu_fonts ]";
|
2014-04-29 03:25:47 -07:00
|
|
|
description = "List of primary font paths.";
|
2013-06-27 04:12:45 -07:00
|
|
|
};
|
|
|
|
|
2016-09-05 06:48:48 -07:00
|
|
|
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.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2013-06-27 04:12:45 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2014-04-29 03:25:47 -07:00
|
|
|
config = {
|
|
|
|
|
2016-09-05 06:48:48 -07:00
|
|
|
fonts.fonts = mkIf config.fonts.enableDefaultFonts
|
2020-09-29 19:41:34 -07:00
|
|
|
([
|
2014-11-30 12:00:33 -08:00
|
|
|
pkgs.dejavu_fonts
|
2014-04-29 03:25:47 -07:00
|
|
|
pkgs.freefont_ttf
|
2017-04-08 07:33:21 -07:00
|
|
|
pkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts
|
2014-04-29 03:25:47 -07:00
|
|
|
pkgs.liberation_ttf
|
|
|
|
pkgs.xorg.fontmiscmisc
|
|
|
|
pkgs.xorg.fontcursormisc
|
2015-09-26 11:53:21 -07:00
|
|
|
pkgs.unifont
|
2019-08-29 14:03:46 -07:00
|
|
|
pkgs.noto-fonts-emoji
|
2020-09-29 19:41:34 -07:00
|
|
|
] ++ lib.optionals (config.nixpkgs.config.allowUnfree or false) [
|
|
|
|
# these are unfree, and will make usage with xserver fail
|
|
|
|
pkgs.xorg.fontbhlucidatypewriter100dpi
|
|
|
|
pkgs.xorg.fontbhlucidatypewriter75dpi
|
|
|
|
pkgs.xorg.fontbh100dpi
|
|
|
|
]);
|
2014-04-29 03:25:47 -07:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2013-06-27 04:12:45 -07:00
|
|
|
}
|