nixos-config/modules/fonts.nix

44 lines
1.4 KiB
Nix
Raw Normal View History

2020-12-05 13:48:06 +01:00
{ config, lib, pkgs, ... }:
2020-08-22 17:44:39 +02:00
lib.mkIf config.sbruder.gui.enable {
2020-08-22 17:44:39 +02:00
fonts = {
fonts = with pkgs; [
(nerdfonts.override { fonts = [ "Iosevka" ]; }) # default monospace font
] ++ lib.optionals config.sbruder.full [
2020-08-22 17:44:39 +02:00
google-fonts # google font collection (free)
2020-10-11 13:02:48 +02:00
lmodern # Latin Modern for non-latex applications
noto-fonts-emoji-blob-bin # The most owo emojis (thanks google for killing them)
source-han-sans
source-han-serif # CJK fonts
] ++ lib.optionals (!config.sbruder.full) [
roboto # default sans-serif font (normally included in google-fonts)
] ++ lib.optionals config.sbruder.unfree.allowAssets [
corefonts # good ol microsoft fonts
2020-08-22 17:44:39 +02:00
vistafonts # newer microsoft fonts
];
enableDefaultFonts = true;
fontconfig = {
defaultFonts = {
emoji = [ "Blobmoji" ];
monospace = [ "Iosevka Nerd Font" "Source Han Sans" ];
sansSerif = [ "Roboto" "Source Han Sans" ];
serif = [ "Georgia" "Source Han Serif" ];
};
localConf = /* xml */ ''
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<alias>
<family>system-ui</family>
<prefer>
<family>sans-serif</family>
</prefer>
</alias>
</fontconfig>
'';
2020-08-22 17:44:39 +02:00
};
};
}