diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-02-03 16:54:03 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-02-03 16:57:19 +0100 |
commit | ae74c356d94b795eb07dfe9978788b49b70f5959 (patch) | |
tree | c13c6894b75f95d3a4dc4627efef508bb03dfba8 /nixos/modules/config/fonts | |
parent | c9790126312119ce5a2a8ac946d9f086e7ea9f55 (diff) | |
parent | 53e0f8b1cdf36574bfede6e62e2ac2739c3ef804 (diff) |
Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
Diffstat (limited to 'nixos/modules/config/fonts')
-rw-r--r-- | nixos/modules/config/fonts/fontconfig.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index c027796d5476..1eaebe4b2bbd 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -129,6 +129,14 @@ with lib; }; + cache32Bit = mkOption { + default = false; + type = types.bool; + description = '' + Generate system fonts cache for 32-bit applications. + ''; + }; + }; }; @@ -231,12 +239,19 @@ with lib; "${pkgs.fontconfig.out}/etc/fonts/fonts.conf"; environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text = - '' + let + cache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; }; + in '' <?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <fontconfig> <!-- Font directories --> ${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)} + <!-- Pre-generated font caches --> + <cachedir>${cache pkgs.fontconfig}</cachedir> + ${optionalString (pkgs.stdenv.isx86_64 && config.fonts.fontconfig.cache32Bit) '' + <cachedir>${cache pkgs.pkgsi686Linux.fontconfig}</cachedir> + ''} </fontconfig> ''; |