{ lib, pkgs, ... }: with lib; { imports = [ (mkAliasOptionModule ["fontScheme"] [ "nixfiles" "modules" "fonts" "fontScheme" ]) ]; options.nixfiles.modules.fonts = { enable = mkEnableOption "fonts and their configurations"; packages = mkOption { description = "Font packages to install."; type = with types; listOf package; default = with pkgs; [ (iosevka-bin.override {variant = "aile";}) (iosevka-bin.override {variant = "etoile";}) iosevka-bin sarasa-gothic ]; }; fontScheme = let mkFont = { family, style, size, }: { family = mkOption { description = "Family of the font."; type = types.str; default = family; }; style = mkOption { description = "Style of the font."; type = types.str; default = style; }; size = mkOption { description = "Size of the font."; type = types.int; default = size; }; }; in { serifFont = mkFont { family = "Iosevka Etoile"; style = "Regular"; size = 14; }; serifFontFallback = mkFont { family = "Sarasa Gothic J"; style = "Regular"; size = 14; }; sansSerifFont = mkFont { family = "Iosevka Aile"; style = "Regular"; size = 14; }; sansSerifFontFallback = mkFont { family = "Sarasa Gothic J"; style = "Regular"; size = 14; }; monospaceFont = mkFont { family = "Iosevka"; style = "Regular"; size = 14; }; monospaceFontFallback = mkFont { family = "Sarasa Mono J"; style = "Regular"; size = 14; }; }; }; }