fonts: refactor

This commit is contained in:
Charlie Root 2025-03-26 19:16:02 +01:00
commit 753fb58c91
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
2 changed files with 12 additions and 18 deletions

View file

@ -1,12 +0,0 @@
{lib, ...}: let
inherit (lib) mkOption;
inherit (lib.types) package listOf;
in {
options.modules.system.fonts = {
# This defines extra fonts to be installed on the system.
extraFonts = mkOption {
type = listOf package;
default = [];
};
};
}

View file

@ -1,16 +1,21 @@
{pkgs, ...}: let
inherit (builtins) mapAttrs;
custom-iosevka = pkgs.iosevka.override {
valiosevka = pkgs.iosevka.override {
privateBuildPlan = {
family = "Iosevka Custom";
family = "valiosevka";
spacing = "normal";
serifs = "sans";
noCvSs = true;
exportGlyphNames = false;
variants.inherits = "ss15";
ligations.inherits = "dlig";
variants = {
inherits = "ss15";
design = {
e = "flat-crossbar";
f = "diagonal-tailed-crossbar-at-x-height";
};
};
};
set = "Fancy";
};
@ -29,6 +34,7 @@ in {
# Enable font hinting. Hinting aligns glyphs to pixel boundaries
# to improve rendering sharpness at low resolution.
hinting.enable = true;
# Set the defalt fonts. This was taken from raf,
# many thanks.
defaultFonts = let
@ -50,7 +56,6 @@ in {
packages = builtins.attrValues {
inherit
(pkgs)
# custom-iosevka
material-icons
material-design-icons
papirus-icon-theme
@ -69,6 +74,7 @@ in {
comic-shanns-mono
symbols-only
;
inherit valiosevka;
};
fontDir = {
# Whether to create a directory with links to all fonts in