nixos-config/modules/fonts/default.nix

122 lines
3.3 KiB
Nix

{ 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";
capital-w = "straight-flat-top";
a = "double-storey-serifless";
d = "toothed-serifless";
e = "flat-crossbar";
f = "flat-hook";
g = "single-storey-serifless";
i = "serifless";
j = "flat-hook-serifless";
k = "straight-serifless";
l = "serifless";
r = "compact";
t = "flat-hook";
u = "toothed";
w = "straight-flat-top";
y = "straight";
long-s = "flat-hook";
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";
at = "fourfold";
percent = "rings-continuous-slash";
};
derivingVariants.mathtt.design = {
capital-i = "serifed";
capital-j = "serifless";
capital-k = "straight-serifless";
capital-m = "flat-bottom";
capital-w = "straight-flat-top";
a = "double-storey-serifless";
d = "toothed-serifless";
e = "flat-crossbar";
f = "flat-hook";
g = "single-storey-serifless";
i = "serifed";
j = "flat-hook-serifed";
k = "straight-serifless";
l = "serifed";
r = "compact";
t = "flat-hook";
u = "toothed";
w = "straight-flat-top";
y = "straight";
long-s = "flat-hook";
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";
at = "fourfold";
percent = "rings-continuous-slash";
};
widths.normal = {
shape = 600;
menu = 5;
css = "normal";
};
};
set = "aile";
};
in
{
options.eboskma.fonts = { enable = mkEnableOption "activate fonts"; };
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
iosevka-aile
kochi-substitute
material-icons
noto-fonts-emoji
recursive
ttf_bitstream_vera
twitter-color-emoji
];
fontconfig = {
defaultFonts = {
serif = [ "Recursive Sans Casual Static Medium" ];
sansSerif = [ "Iosevka Aile" ];
monospace = [ "Iosevka Nerd Font" ];
emoji = [ "Twitter Color Emoji" ];
};
};
};
};
}