Update fontconfig
This commit is contained in:
parent
22e82d1e1d
commit
ee9d9cdaad
2 changed files with 63 additions and 0 deletions
|
@ -14,6 +14,7 @@ imports = [
|
|||
"${(builtins.fetchGit "ssh://git@git.darmstadt.ccc.de/cdark.net/nixdark")}"
|
||||
./hardware-configuration.nix
|
||||
../../system
|
||||
../../system/modules/fonts.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
|
|
62
system/modules/fonts.nix
Normal file
62
system/modules/fonts.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
fonts = {
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
antialias = true;
|
||||
cache32Bit = true;
|
||||
defaultFonts = {
|
||||
monospace = [ "Source Code Pro For Powerline" "Roboto Mono" "DejaVu Sans Mono" ];
|
||||
sansSerif = [ "Roboto Regular" "DejaVu Sans" ];
|
||||
serif = [ "Roboto Slab Regular" "DejaVu Serif" ];
|
||||
};
|
||||
ultimate = {
|
||||
enable = true;
|
||||
substitutions = "combi";
|
||||
};
|
||||
};
|
||||
enableDefaultFonts = true;
|
||||
enableFontDir = true;
|
||||
fonts = [
|
||||
pkgs.anonymousPro
|
||||
pkgs.arkpandora_ttf
|
||||
pkgs.caladea
|
||||
pkgs.carlito
|
||||
pkgs.comfortaa
|
||||
pkgs.comic-relief
|
||||
pkgs.crimson
|
||||
pkgs.dejavu_fonts
|
||||
pkgs.google-fonts
|
||||
pkgs.inconsolata
|
||||
pkgs.iosevka
|
||||
pkgs.liberationsansnarrow
|
||||
pkgs.liberation_ttf
|
||||
pkgs.libertine
|
||||
pkgs.mononoki
|
||||
pkgs.montserrat
|
||||
pkgs.nerdfonts
|
||||
pkgs.norwester-font
|
||||
pkgs.opensans-ttf
|
||||
pkgs.powerline-fonts
|
||||
pkgs.roboto
|
||||
pkgs.sampradaya
|
||||
pkgs.source-code-pro
|
||||
pkgs.source-sans-pro
|
||||
pkgs.source-serif-pro
|
||||
pkgs.tai-ahom
|
||||
pkgs.tempora_lgc
|
||||
pkgs.terminus_font
|
||||
pkgs.theano
|
||||
pkgs.ubuntu_font_family
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# 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);
|
||||
in builtins.listToAttrs (lib.imap0 (n: v: lib.nameValuePair "src-cache/fonts/${toString n}" { source = builtins.toPath v; }) font_sources);
|
||||
}
|
Loading…
Reference in a new issue