2024-09-08 19:22:14 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-12 20:50:53 -05:00
|
|
|
with lib; let
|
2024-09-08 19:22:14 -05:00
|
|
|
cfg = config.custom.settings.fonts;
|
2024-09-12 20:50:53 -05:00
|
|
|
in {
|
2025-01-01 11:44:31 -06:00
|
|
|
options.custom.settings.fonts = {
|
|
|
|
enable = mkOption {default = false;};
|
2025-01-11 11:53:06 -06:00
|
|
|
emoji = mkOption {default = "Blobmoji";};
|
2025-01-09 20:25:14 -06:00
|
|
|
fallback = mkOption {default = "Unifont";};
|
2025-01-11 11:53:06 -06:00
|
|
|
monospace = mkOption {default = "IosevkaTermSlab NFP Medium";};
|
2025-01-12 13:19:18 -06:00
|
|
|
sans-serif = mkOption {default = "Arvo";};
|
2025-01-11 11:53:06 -06:00
|
|
|
serif = mkOption {default = "Lora";};
|
2025-01-12 13:19:18 -06:00
|
|
|
weight = mkOption {default = "400";};
|
2025-01-01 11:44:31 -06:00
|
|
|
};
|
2024-09-08 19:22:14 -05:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# https://wiki.nixos.org/wiki/Fonts
|
|
|
|
fonts = {
|
|
|
|
enableDefaultPackages = true; # Fallback fonts
|
|
|
|
|
2024-12-07 22:06:49 -06:00
|
|
|
packages = with pkgs.nerd-fonts;
|
|
|
|
[
|
2025-01-12 13:19:18 -06:00
|
|
|
# Monospace
|
2024-12-07 22:06:49 -06:00
|
|
|
# https://www.nerdfonts.com/#home
|
|
|
|
#?? kitten choose-fonts
|
|
|
|
departure-mono
|
|
|
|
gohufont
|
|
|
|
iosevka-term
|
|
|
|
iosevka-term-slab
|
|
|
|
jetbrains-mono
|
2025-01-12 13:19:18 -06:00
|
|
|
roboto-mono
|
2025-01-11 11:53:06 -06:00
|
|
|
shure-tech-mono
|
2024-12-07 22:06:49 -06:00
|
|
|
space-mono
|
|
|
|
zed-mono
|
|
|
|
]
|
|
|
|
++ (with pkgs; [
|
|
|
|
(google-fonts.override {
|
|
|
|
fonts = [
|
|
|
|
# Pixel
|
2025-01-11 11:53:06 -06:00
|
|
|
"Geo"
|
2024-12-07 22:06:49 -06:00
|
|
|
"Silkscreen"
|
2025-01-11 11:53:06 -06:00
|
|
|
|
2025-01-12 13:19:18 -06:00
|
|
|
# Sans-serif
|
|
|
|
"Josefin Sans"
|
|
|
|
"Jost"
|
|
|
|
"Lexend"
|
|
|
|
"Outfit"
|
|
|
|
"Roboto"
|
|
|
|
"Roboto Flex"
|
|
|
|
|
|
|
|
# Sans-serif condensed
|
|
|
|
"Oswald"
|
|
|
|
"Roboto Condensed"
|
|
|
|
|
|
|
|
# Serif
|
2025-01-11 11:53:06 -06:00
|
|
|
"Lora"
|
2025-01-12 13:19:18 -06:00
|
|
|
"Roboto Serif"
|
|
|
|
|
|
|
|
# Slab
|
|
|
|
"Aleo"
|
|
|
|
"Arvo"
|
|
|
|
"Josefin Slab"
|
|
|
|
"Roboto Slab"
|
|
|
|
"Solway"
|
2024-12-07 22:06:49 -06:00
|
|
|
];
|
|
|
|
})
|
2024-09-08 19:22:14 -05:00
|
|
|
|
2025-01-12 13:19:18 -06:00
|
|
|
# Emoji
|
|
|
|
noto-fonts-color-emoji
|
2025-01-11 11:53:06 -06:00
|
|
|
noto-fonts-emoji-blob-bin
|
|
|
|
|
2024-12-07 22:06:49 -06:00
|
|
|
# Microsoft
|
|
|
|
corefonts
|
|
|
|
vistafonts
|
2025-01-09 20:25:14 -06:00
|
|
|
|
|
|
|
# Fallback
|
|
|
|
unifont
|
2024-12-07 22:06:49 -06:00
|
|
|
]);
|
2024-09-08 19:22:14 -05:00
|
|
|
|
2025-01-11 11:53:06 -06:00
|
|
|
#?? fc-list : family | sort
|
2024-09-08 19:22:14 -05:00
|
|
|
fontconfig.defaultFonts = {
|
2025-01-01 11:44:31 -06:00
|
|
|
emoji = [cfg.emoji];
|
|
|
|
monospace = [cfg.monospace];
|
|
|
|
sansSerif = [cfg.sans-serif];
|
|
|
|
serif = [cfg.serif];
|
2024-09-08 19:22:14 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-07 22:06:49 -06:00
|
|
|
home-manager.users.${config.custom.username}.fonts.fontconfig.defaultFonts = config.fonts.fontconfig.defaultFonts;
|
2024-09-08 19:22:14 -05:00
|
|
|
};
|
|
|
|
}
|