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
|
|
|
|
|
2024-12-08 04:06:49 +00:00
|
|
|
packages = with pkgs.nerd-fonts;
|
|
|
|
[
|
|
|
|
### Monospace
|
|
|
|
# https://www.nerdfonts.com/#home
|
|
|
|
#?? kitten choose-fonts
|
|
|
|
departure-mono
|
|
|
|
gohufont
|
|
|
|
iosevka-term
|
|
|
|
iosevka-term-slab
|
|
|
|
jetbrains-mono
|
|
|
|
space-mono
|
|
|
|
zed-mono
|
|
|
|
]
|
|
|
|
++ (with pkgs; [
|
|
|
|
### Sans Serif
|
|
|
|
(google-fonts.override {
|
|
|
|
fonts = [
|
|
|
|
# Text
|
|
|
|
"Jost"
|
|
|
|
"Lexend"
|
|
|
|
"Outfit"
|
2024-09-09 00:22:14 +00:00
|
|
|
|
2024-12-08 04:06:49 +00:00
|
|
|
# Condensed
|
|
|
|
"Oswald"
|
2024-09-09 00:22:14 +00:00
|
|
|
|
2024-12-08 04:06:49 +00:00
|
|
|
# Pixel
|
|
|
|
"Silkscreen"
|
|
|
|
];
|
|
|
|
})
|
2024-09-09 00:22:14 +00:00
|
|
|
|
2024-12-08 04:06:49 +00:00
|
|
|
### Other
|
|
|
|
# Microsoft
|
|
|
|
corefonts
|
|
|
|
vistafonts
|
|
|
|
]);
|
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
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-08 04:06:49 +00:00
|
|
|
home-manager.users.${config.custom.username}.fonts.fontconfig.defaultFonts = config.fonts.fontconfig.defaultFonts;
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
}
|