{ lib , pkgs , config , ... }: with lib; let cfg = config.eboskma.fonts; iosevka-aile = pkgs.iosevka.override { privateBuildPlan = { family = "Iosevka Aile"; desc = "Sans serif"; spacing = "quasi-proportional"; snapshotFamily = "Iosevka Aile"; snapshotFeature = { "NWID" = 0; }; export-glyph-names = true; variants.design = { capital-i = "serifless"; capital-j = "serifless"; capital-k = "straight-serifless"; capital-m = "flat-bottom-serifless"; capital-w = "straight-flat-top-serifless"; a = "double-storey-serifless"; d = "toothed-serifless"; e = "flat-crossbar"; f = "flat-hook-serifless"; g = "single-storey-serifless"; i = "serifless"; j = "flat-hook-serifless"; k = "straight-serifless"; l = "serifless"; r = "compact-serifless"; t = "flat-hook"; u = "toothed-serifless"; w = "straight-flat-top-serifless"; y = "straight-serifless"; long-s = "flat-hook-serifless"; eszet = "longs-s-lig"; lower-iota = "flat-tailed"; lower-lambda = "straight-turn"; cyrl-ef = "serifless"; cyrl-capital-ka = "symmetric-connected-serifless"; cyrl-ka = "symmetric-connected-serifless"; cyrl-capital-u = "straight-serifless"; at = "fourfold"; percent = "rings-continuous-slash"; }; derivingVariants.mathtt.design = { capital-i = "serifed"; capital-j = "serifless"; capital-k = "straight-serifless"; capital-m = "flat-bottom-serifless"; capital-w = "straight-flat-top-serifless"; a = "double-storey-serifless"; d = "toothed-serifless"; e = "flat-crossbar"; f = "flat-hook-serifless"; g = "single-storey-serifless"; i = "serifed"; j = "flat-hook-serifed"; k = "straight-serifless"; l = "serifed"; r = "compact-serifless"; t = "flat-hook"; u = "toothed-serifless"; w = "straight-flat-top-serifless"; y = "straight-serifless"; long-s = "flat-hook-serifless"; eszet = "longs-s-lig"; lower-iota = "flat-tailed"; lower-lambda = "straight-turn"; cyrl-ef = "serifless"; cyrl-capital-ka = "symmetric-connected-serifless"; cyrl-ka = "symmetric-connected-serifless"; cyrl-capital-u = "straight-serifless"; at = "fourfold"; percent = "rings-continuous-slash"; }; widths.normal = { shape = 600; menu = 5; css = "normal"; }; }; set = "aile"; }; in { options.eboskma.fonts = { enable = mkEnableOption "activate fonts"; iosevka-aile = mkOption { description = "Install Iosevka Aile"; type = types.bool; default = true; }; }; config = mkIf cfg.enable { fonts = { fontDir.enable = true; fonts = with pkgs; [ (nerdfonts.override { fonts = [ "CascadiaCode" "DroidSansMono" "FiraCode" "Inconsolata" "Iosevka" "Monoid" "Meslo" "Noto" "SourceCodePro" ]; }) corefonts dejavu_fonts google-fonts kochi-substitute material-icons noto-fonts-emoji recursive ttf_bitstream_vera twitter-color-emoji ] ++ lib.optional cfg.iosevka-aile iosevka-aile; fontconfig = { defaultFonts = { serif = [ "Recursive Sans Casual Static Medium" ]; sansSerif = [ (if cfg.iosevka-aile then "Iosevka Aile" else "DejaVu Sans") ]; monospace = [ "Iosevka Nerd Font" ]; emoji = [ "Twitter Color Emoji" ]; }; }; }; }; }