refactor: font config

This commit is contained in:
2025-10-19 16:21:25 +08:00
parent 090677e101
commit 6bc50deb6a
4 changed files with 48 additions and 68 deletions

47
modules/fonts.nix Normal file
View File

@@ -0,0 +1,47 @@
{
config,
pkgs,
lib,
...
}:
lib.my.makeSwitch {
inherit config;
default = true;
optionName = "default font settings";
optionPath = [ "fonts" ];
config' = {
fonts = {
enableDefaultPackages = false;
fontDir.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
jetbrains-mono
nerd-fonts.symbols-only
];
fontconfig.defaultFonts = {
serif = [
"Noto Serif CJK SC"
"Noto Serif"
"Symbols Nerd Font"
];
sansSerif = [
"Noto Sans CJK SC"
"Noto Sans"
"Symbols Nerd Font"
];
monospace = [
"JetBrains Mono"
"Noto Sans Mono CJK SC"
"Symbols Nerd Font Mono"
];
emoji = [ "Noto Color Emoji" ];
};
};
};
}