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

89 lines
1.9 KiB
Nix
Raw Normal View History

2024-05-23 20:26:30 +00:00
{
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
2025-04-27 11:11:51 -04:00
# iosevka
2025-01-12 13:37:57 -05:00
cantarell-fonts
2025-04-27 11:11:51 -04:00
(iosevka.override
{
set = "Custom";
privateBuildPlan = ''
[buildPlans.IosevkaCustom]
family = "Iosevka"
2025-05-29 10:51:57 -04:00
spacing = "fontconfig-mono"
2025-04-27 11:11:51 -04:00
serifs = "sans"
noCvSs = true
exportGlyphNames = true
2025-05-29 10:51:57 -04:00
[buildPlans.IosevkaCustom.variants]
inherits = "ss08"
2025-04-27 11:11:51 -04:00
2025-05-29 10:51:57 -04:00
[buildPlans.IosevkaCustom.widths.Normal]
shape = 500
menu = 5
2025-05-06 20:02:36 -04:00
css = "normal"
2025-04-27 11:11:51 -04:00
2025-05-29 10:51:57 -04:00
[buildPlans.IosevkaCustom.widths.Extended]
shape = 600
menu = 7
css = "expanded"
2025-04-27 11:11:51 -04:00
'';
})
2024-05-23 20:26:30 +00:00
noto-fonts
2024-10-31 21:01:42 -04:00
noto-fonts-cjk-sans
2024-05-23 20:26:30 +00:00
noto-fonts-emoji
jetbrains-mono
2024-12-16 16:39:20 -05:00
nerd-fonts.iosevka
2025-01-19 15:04:19 -05:00
nerd-fonts.zed-mono
2025-05-06 20:02:36 -04:00
nerd-fonts.fira-code
nerd-fonts.jetbrains-mono
2025-03-22 16:03:07 -04:00
adwaita-fonts
2025-04-07 13:07:15 -04:00
cozette
scientifica
2024-12-16 16:39:20 -05:00
# (nerdfonts.override {fonts = ["ZedMono" "Iosevka"];})
2024-05-23 20:26:30 +00:00
];
enableDefaultPackages = false;
# this fixes emoji stuff
fontconfig = {
defaultFonts = {
monospace = [
2025-05-06 20:02:36 -04:00
fonts.mono
2024-05-23 20:26:30 +00:00
"Noto Color Emoji"
];
2025-05-06 20:02:36 -04:00
sansSerif = [fonts.ui "Noto Color Emoji"];
serif = [fonts.ui "Noto Color Emoji"];
2024-05-23 20:26:30 +00:00
emoji = ["Noto Color Emoji"];
};
};
};
};
}