2024-09-09 00:22:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-13 01:50:53 +00:00
|
|
|
with lib; let
|
2024-09-09 00:22:14 +00:00
|
|
|
cfg = config.custom.settings.fonts;
|
2024-09-13 01:50:53 +00:00
|
|
|
in {
|
|
|
|
options.custom.settings.fonts.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# https://wiki.nixos.org/wiki/Fonts
|
|
|
|
fonts = {
|
|
|
|
enableDefaultPackages = true; # Fallback fonts
|
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
# Monospace
|
2024-09-13 01:50:53 +00:00
|
|
|
(nerdfonts.override {fonts = ["Iosevka"];})
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
# Sans Serif
|
|
|
|
(google-fonts.override {
|
|
|
|
fonts = [
|
|
|
|
# Text
|
|
|
|
"Jost"
|
|
|
|
"Lexend"
|
|
|
|
"Outfit"
|
|
|
|
|
|
|
|
# Condensed
|
|
|
|
"Oswald"
|
|
|
|
|
|
|
|
# Pixel
|
|
|
|
"Silkscreen"
|
|
|
|
];
|
|
|
|
})
|
2024-09-30 21:25:03 +00:00
|
|
|
|
|
|
|
# Microsoft
|
|
|
|
corefonts
|
2024-09-09 00:22:14 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
#?? fc-list --brief | grep family: | sort
|
|
|
|
fontconfig.defaultFonts = {
|
2024-09-21 15:47:31 +00:00
|
|
|
emoji = [config.custom.font.emoji];
|
|
|
|
monospace = [config.custom.font.monospace];
|
|
|
|
sansSerif = [config.custom.font.sans-serif];
|
|
|
|
serif = [config.custom.font.serif];
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager.users.${config.custom.username}.fonts.fontconfig.defaultFonts =
|
|
|
|
config.fonts.fontconfig.defaultFonts;
|
|
|
|
};
|
|
|
|
}
|