110 lines
2.8 KiB
Nix
110 lines
2.8 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
|
|
work-sans
|
|
comic-neue
|
|
source-sans
|
|
twemoji-color-font
|
|
comfortaa
|
|
inter
|
|
lato
|
|
lexend
|
|
jost
|
|
dejavu_fonts
|
|
iosevka
|
|
cantarell-fonts
|
|
# (iosevka.override
|
|
# {
|
|
# set = "Custom";
|
|
# privateBuildPlan = ''
|
|
# [buildPlans.IosevkaCustom]
|
|
# family = "Iosevka"
|
|
# spacing = "fontconfig-mono"
|
|
# serifs = "sans"
|
|
# noCvSs = true
|
|
# exportGlyphNames = true
|
|
#
|
|
# [buildPlans.IosevkaCustom.variants]
|
|
# inherits = "ss08"
|
|
#
|
|
# [buildPlans.IosevkaCustom.widths.Normal]
|
|
# shape = 500
|
|
# menu = 5
|
|
# css = "normal"
|
|
#
|
|
# [buildPlans.IosevkaCustom.widths.Extended]
|
|
# shape = 600
|
|
# menu = 7
|
|
# css = "expanded"
|
|
# '';
|
|
# })
|
|
noto-fonts
|
|
noto-fonts-cjk-sans
|
|
noto-fonts-emoji
|
|
jetbrains-mono
|
|
nerd-fonts.iosevka
|
|
nerd-fonts.zed-mono
|
|
nerd-fonts.fira-code
|
|
nerd-fonts.jetbrains-mono
|
|
adwaita-fonts
|
|
cozette
|
|
scientifica
|
|
(material-symbols.overrideAttrs {
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = "material-design-icons";
|
|
rev = "941fa95d7f6084a599a54ca71bc565f48e7c6d9e";
|
|
hash = "sha256-rH/SSBP3xgiyUDyF371pmg8wAi2xavS79vKmOhyLEmI=";
|
|
sparseCheckout = ["variablefont" "font"];
|
|
};
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
rename 's/\[FILL,GRAD,opsz,wght\]//g' variablefont/*
|
|
install -Dm755 variablefont/*.ttf -t $out/share/fonts/TTF
|
|
install -Dm755 variablefont/*.woff2 -t $out/share/fonts/woff2
|
|
|
|
install -Dm755 font/*.ttf -t $out/share/fonts/TTF
|
|
install -Dm755 font/*.otf -t $out/share/fonts/OTF
|
|
|
|
runHook postInstall
|
|
'';
|
|
})
|
|
# (nerdfonts.override {fonts = ["ZedMono" "Iosevka"];})
|
|
];
|
|
|
|
enableDefaultPackages = false;
|
|
|
|
# this fixes emoji stuff
|
|
fontconfig = {
|
|
defaultFonts = {
|
|
monospace = [
|
|
fonts.mono
|
|
"Noto Color Emoji"
|
|
];
|
|
sansSerif = [fonts.ui "Noto Color Emoji"];
|
|
serif = [fonts.ui "Noto Color Emoji"];
|
|
emoji = ["Noto Color Emoji"];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|