config/modules/nixos/ui/fonts/default.nix

58 lines
1.1 KiB
Nix

{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.ui.fonts;
in {
options.ui.fonts = with types; {
enable = mkBoolOpt false "Enable Custom Fonts";
};
config = mkIf cfg.enable {
fonts = {
packages = with pkgs; [
material-icons
material-design-icons
roboto
work-sans
comic-neue
source-sans
twemoji-color-font
comfortaa
inter
lato
lexend
jost
dejavu_fonts
iosevka-bin
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
jetbrains-mono
(nerdfonts.override {fonts = ["Iosevka" "JetBrainsMono"];})
custom.zed-fonts
];
enableDefaultPackages = false;
# this fixes emoji stuff
fontconfig = {
defaultFonts = {
monospace = [
"ZedMono Nerd Font Mono"
"Zed Mono"
"Noto Color Emoji"
];
sansSerif = ["Zed Sans" "Noto Color Emoji"];
serif = ["Noto Serif" "Noto Color Emoji"];
emoji = ["Noto Color Emoji"];
};
};
};
};
}