2019-07-23 17:19:33 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
fonts = {
|
|
|
|
fontconfig = {
|
|
|
|
enable = true;
|
|
|
|
antialias = true;
|
|
|
|
cache32Bit = true;
|
|
|
|
defaultFonts = {
|
2019-07-31 21:56:52 +00:00
|
|
|
monospace =
|
|
|
|
[ "Source Code Pro For Powerline" "Roboto Mono" "DejaVu Sans Mono" ];
|
2019-07-23 17:19:33 +00:00
|
|
|
sansSerif = [ "Roboto Regular" "DejaVu Sans" ];
|
|
|
|
serif = [ "Roboto Slab Regular" "DejaVu Serif" ];
|
|
|
|
};
|
|
|
|
ultimate = {
|
|
|
|
enable = true;
|
|
|
|
substitutions = "combi";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
enableDefaultFonts = true;
|
|
|
|
enableFontDir = true;
|
2019-07-31 20:36:41 +00:00
|
|
|
fonts = builtins.attrValues {
|
|
|
|
inherit (pkgs)
|
2019-07-31 21:56:52 +00:00
|
|
|
anonymousPro arkpandora_ttf caladea carlito comfortaa comic-relief
|
|
|
|
crimson dejavu_fonts google-fonts inconsolata iosevka
|
|
|
|
liberationsansnarrow liberation_ttf libertine mononoki montserrat
|
|
|
|
nerdfonts norwester-font opensans-ttf powerline-fonts roboto sampradaya
|
|
|
|
source-code-pro source-sans-pro source-serif-pro tai-ahom tempora_lgc
|
2019-09-15 19:10:00 +00:00
|
|
|
terminus_font theano ubuntu_font_family hasklig;
|
2019-07-31 20:36:41 +00:00
|
|
|
};
|
2019-07-23 17:19:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# create a cache of the font sources, often slow internet connections make it painful to
|
|
|
|
# re-download them after a few months
|
|
|
|
environment.etc = let
|
|
|
|
# fonts with src attributes
|
|
|
|
font_sources = map (v: v.src) (lib.filter (v: v ? src) config.fonts.fonts);
|
2019-07-31 21:56:52 +00:00
|
|
|
in builtins.listToAttrs (lib.imap0 (n: v:
|
|
|
|
lib.nameValuePair "src-cache/fonts/${toString n}" {
|
|
|
|
source = builtins.toPath v;
|
|
|
|
}) font_sources);
|
2019-07-23 17:19:33 +00:00
|
|
|
}
|