2025-07-20 01:23:48 +02:00
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
2024-09-03 15:20:22 +02:00
|
|
|
inherit (builtins) mapAttrs;
|
2025-07-03 23:34:39 +02:00
|
|
|
|
|
|
|
fancy-iosevka = pkgs.iosevka.override {
|
|
|
|
privateBuildPlan = {
|
|
|
|
family = "fancy-iosevka";
|
|
|
|
spacing = "term";
|
|
|
|
serifs = "sans";
|
|
|
|
noCvSs = true;
|
|
|
|
exportGlyphNames = false;
|
|
|
|
|
|
|
|
ligations.inherits = "dlig";
|
|
|
|
variants = {
|
|
|
|
inherits = "ss15";
|
|
|
|
design = {
|
|
|
|
e = "flat-crossbar";
|
|
|
|
f = "diagonal-tailed-crossbar-at-x-height";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
weights.Regular = {
|
|
|
|
shape = 400;
|
|
|
|
menu = 400;
|
|
|
|
css = 400;
|
|
|
|
};
|
|
|
|
weights.Bold = {
|
|
|
|
shape = 700;
|
|
|
|
menu = 700;
|
|
|
|
css = 700;
|
|
|
|
};
|
|
|
|
widths.Condensed = {
|
|
|
|
shape = 500;
|
|
|
|
menu = 3;
|
|
|
|
css = "condensed";
|
|
|
|
};
|
|
|
|
widths.normal = {
|
|
|
|
shape = 600;
|
|
|
|
menu = 5;
|
|
|
|
css = "normal";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
set = "Fancy";
|
|
|
|
};
|
2025-07-20 01:23:48 +02:00
|
|
|
in
|
|
|
|
{
|
2024-09-03 15:20:22 +02:00
|
|
|
# A (somewhat) sane list of fonts to be installed.
|
|
|
|
fonts = {
|
|
|
|
fontconfig = {
|
|
|
|
# Whether to enable fontconfig configuration. This will, for
|
|
|
|
# example, allow fontconfig to discover fonts and configurations
|
|
|
|
# installed through home.packages and nix-env.
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
# Enable font antialiasing.
|
|
|
|
antialias = true;
|
|
|
|
|
|
|
|
# Enable font hinting. Hinting aligns glyphs to pixel boundaries
|
|
|
|
# to improve rendering sharpness at low resolution.
|
|
|
|
hinting.enable = true;
|
2025-03-26 19:16:02 +01:00
|
|
|
|
2024-09-03 15:20:22 +02:00
|
|
|
# Set the defalt fonts. This was taken from raf,
|
|
|
|
# many thanks.
|
2025-07-20 01:23:48 +02:00
|
|
|
defaultFonts =
|
|
|
|
let
|
|
|
|
common = [
|
|
|
|
"Iosevka Nerd Font"
|
|
|
|
"Roboto Mono Nerd Font"
|
|
|
|
"Fira Code Nerd Font"
|
|
|
|
"Symbols Nerd Font"
|
|
|
|
"Noto Color Emoji"
|
|
|
|
"JetbrainsMono Nerd Font"
|
|
|
|
];
|
|
|
|
in
|
2024-09-03 15:20:22 +02:00
|
|
|
mapAttrs (_: fonts: fonts ++ common) {
|
2025-07-20 01:23:48 +02:00
|
|
|
serif = [ "Noto Serif" ];
|
|
|
|
sansSerif = [ "Lexend" ];
|
|
|
|
emoji = [ "Noto Color Emoji" ];
|
|
|
|
monospace = [ "Iosevka Nerd Font" ];
|
2024-09-03 15:20:22 +02:00
|
|
|
};
|
|
|
|
};
|
2025-03-02 19:11:27 +01:00
|
|
|
packages = builtins.attrValues {
|
2025-07-20 01:23:48 +02:00
|
|
|
inherit (pkgs)
|
2025-03-02 19:11:27 +01:00
|
|
|
material-icons
|
|
|
|
material-design-icons
|
|
|
|
lexend
|
|
|
|
noto-fonts
|
|
|
|
noto-fonts-cjk-sans
|
|
|
|
noto-fonts-cjk-serif
|
|
|
|
noto-fonts-color-emoji
|
|
|
|
corefonts
|
|
|
|
font-awesome
|
|
|
|
;
|
2025-07-20 01:23:48 +02:00
|
|
|
inherit (pkgs.nerd-fonts)
|
2025-03-02 19:11:27 +01:00
|
|
|
iosevka
|
|
|
|
jetbrains-mono
|
|
|
|
comic-shanns-mono
|
|
|
|
symbols-only
|
|
|
|
;
|
2025-07-03 23:34:39 +02:00
|
|
|
|
2025-07-13 22:51:22 +02:00
|
|
|
# inherit fancy-iosevka;
|
2025-03-02 19:11:27 +01:00
|
|
|
};
|
2024-09-03 15:20:22 +02:00
|
|
|
fontDir = {
|
|
|
|
# Whether to create a directory with links to all fonts in
|
|
|
|
# /run/current-system/sw/share/X11/fonts
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
# Whether to decompress fonts in
|
|
|
|
# /run/current-system/sw/share/X11/fonts
|
|
|
|
decompressFonts = true;
|
|
|
|
};
|
|
|
|
};
|
2024-08-16 10:10:25 +02:00
|
|
|
}
|