mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 10:18:37 +02:00
fix: firefox/chrome - render English's sigle quota correctly
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
{pkgs, myvars, ...}:
|
{
|
||||||
|
pkgs,
|
||||||
|
myvars,
|
||||||
|
...
|
||||||
|
}:
|
||||||
###################################################################################
|
###################################################################################
|
||||||
#
|
#
|
||||||
# macOS's System configuration
|
# macOS's System configuration
|
||||||
@@ -22,7 +26,7 @@
|
|||||||
time.timeZone = "Asia/Shanghai";
|
time.timeZone = "Asia/Shanghai";
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
primaryUser = myvars.username;
|
primaryUser = myvars.username;
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
menuExtraClock.Show24Hour = true; # show 24 hour clock
|
menuExtraClock.Show24Hour = true; # show 24 hour clock
|
||||||
@@ -181,30 +185,4 @@
|
|||||||
# comment this due to the issue:
|
# comment this due to the issue:
|
||||||
# https://github.com/LnL7/nix-darwin/issues/359
|
# https://github.com/LnL7/nix-darwin/issues/359
|
||||||
# time.timeZone = "Asia/shanghai";
|
# time.timeZone = "Asia/shanghai";
|
||||||
|
|
||||||
# Fonts
|
|
||||||
fonts = {
|
|
||||||
packages = with pkgs; [
|
|
||||||
# packages = with pkgs; [
|
|
||||||
# icon fonts
|
|
||||||
material-design-icons
|
|
||||||
font-awesome
|
|
||||||
|
|
||||||
# 思源系列字体是 Adobe 主导的。其中汉字部分被称为「思源黑体」和「思源宋体」,是由 Adobe + Google 共同开发的
|
|
||||||
source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3 和 Source Sans Pro,以及带字重的变体,加上 Source Sans 3 VF
|
|
||||||
source-serif # 衬线字体,不含汉字。字族名叫 Source Code Pro,以及带字重的变体
|
|
||||||
source-han-sans # 思源黑体
|
|
||||||
source-han-serif # 思源宋体
|
|
||||||
|
|
||||||
# nerdfonts
|
|
||||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable-small/pkgs/data/fonts/nerd-fonts/manifests/fonts.json
|
|
||||||
nerd-fonts.symbols-only # symbols icon only
|
|
||||||
nerd-fonts.fira-code
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
nerd-fonts.iosevka
|
|
||||||
|
|
||||||
julia-mono
|
|
||||||
dejavu_fonts
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
24
modules/nixos/base/fonts.nix
Normal file
24
modules/nixos/base/fonts.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
# Fonts
|
||||||
|
fonts = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
# icon fonts
|
||||||
|
material-design-icons
|
||||||
|
font-awesome
|
||||||
|
|
||||||
|
source-sans # 无衬线字体,不含汉字。
|
||||||
|
source-serif # 衬线字体,不含汉字。
|
||||||
|
source-han-sans # 思源黑体
|
||||||
|
source-han-serif # 思源宋体
|
||||||
|
|
||||||
|
# nerdfonts
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable-small/pkgs/data/fonts/nerd-fonts/manifests/fonts.json
|
||||||
|
nerd-fonts.symbols-only # symbols icon only
|
||||||
|
nerd-fonts.fira-code
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
nerd-fonts.iosevka
|
||||||
|
|
||||||
|
julia-mono
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -10,20 +10,29 @@
|
|||||||
material-design-icons
|
material-design-icons
|
||||||
font-awesome
|
font-awesome
|
||||||
|
|
||||||
# Noto 系列字体是 Google 主导的,名字的含义是「没有豆腐」(no tofu),因为缺字时显示的方框或者方框被叫作 tofu
|
# Noto 是 Google 开发的开源字体家族
|
||||||
# Noto 系列字族名只支持英文,命名规则是 Noto + Sans 或 Serif + 文字名称。
|
# 名字的含义是「没有豆腐」(no tofu),因为缺字时显示的方框或者方框被叫作 tofu
|
||||||
# 其中汉字部分叫 Noto Sans/Serif CJK SC/TC/HK/JP/KR,最后一个词是地区变种。
|
#
|
||||||
# noto-fonts # 大部分文字的常见样式,不包含汉字
|
# Noto 系列字族只支持英文,命名规则是 Noto + Sans 或 Serif + 文字名称。
|
||||||
# noto-fonts-cjk # 汉字部分
|
noto-fonts # 大部分文字的常见样式,不包含汉字
|
||||||
noto-fonts-emoji # 彩色的表情符号字体
|
noto-fonts-color-emoji # 彩色的表情符号字体
|
||||||
# noto-fonts-extra # 提供额外的字重和宽度变种
|
# Noto CJK 为「思源」系列汉字字体,由 Adobe + Google 共同开发
|
||||||
|
# Google 以 Noto Sans/Serif CJK SC/TC/HK/JP/KR 的名称发布该系列字体。
|
||||||
|
# noto-fonts-cjk-sans # 思源黑体
|
||||||
|
# noto-fonts-cjk-serif # 思源宋体
|
||||||
|
|
||||||
# 思源系列字体是 Adobe 主导的。其中汉字部分被称为「思源黑体」和「思源宋体」,是由 Adobe + Google 共同开发的
|
# Adobe 以 Source Han Sans/Serif 的名称发布此系列字体
|
||||||
source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3 和 Source Sans Pro,以及带字重的变体,加上 Source Sans 3 VF
|
source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3,以及带字重的变体(VF)
|
||||||
source-serif # 衬线字体,不含汉字。字族名叫 Source Code Pro,以及带字重的变体
|
source-serif # 衬线字体,不含汉字。字族名叫 Source Serif 4,以及带字重的变体
|
||||||
|
# Source Hans 系列汉字字体由 Adobe + Google 共同开发
|
||||||
|
# 这俩跟 noto-fonts-cjk-xxx 实际为同一字体,只是分别由 Adobe/Google 以自己的品牌名发布
|
||||||
source-han-sans # 思源黑体
|
source-han-sans # 思源黑体
|
||||||
source-han-serif # 思源宋体
|
source-han-serif # 思源宋体
|
||||||
|
|
||||||
|
# 文泉驿是旅美学者房骞骞(FangQ)于 2004 年创建的开源汉字字体项目
|
||||||
|
wqy_zenhei # 文泉驿正黑
|
||||||
|
wqy_microhei # 文泉驿微米黑
|
||||||
|
|
||||||
# nerdfonts
|
# nerdfonts
|
||||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable-small/pkgs/data/fonts/nerd-fonts/manifests/fonts.json
|
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable-small/pkgs/data/fonts/nerd-fonts/manifests/fonts.json
|
||||||
nerd-fonts.symbols-only # symbols icon only
|
nerd-fonts.symbols-only # symbols icon only
|
||||||
@@ -32,16 +41,32 @@
|
|||||||
nerd-fonts.iosevka
|
nerd-fonts.iosevka
|
||||||
|
|
||||||
julia-mono
|
julia-mono
|
||||||
dejavu_fonts
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# user defined fonts
|
# User defined default fonts
|
||||||
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
|
|
||||||
# B&W emojis that would sometimes show instead of some Color emojis
|
|
||||||
fontconfig.defaultFonts = {
|
fontconfig.defaultFonts = {
|
||||||
serif = ["Source Han Serif SC" "Source Han Serif TC" "Noto Color Emoji"];
|
serif = [
|
||||||
sansSerif = ["Source Han Sans SC" "Source Han Sans TC" "Noto Color Emoji"];
|
# 英文: 衬线字体
|
||||||
monospace = ["JetBrainsMono Nerd Font" "Noto Color Emoji"];
|
"Source Sans 3"
|
||||||
|
# 中文: 宋体/明体
|
||||||
|
"Source Han Serif SC"
|
||||||
|
"Source Han Serif TC"
|
||||||
|
];
|
||||||
|
# SansSerif 也简写做 Sans, Sans 在法语中就是「without」或者「无」的意思
|
||||||
|
sansSerif = [
|
||||||
|
# 英文: 无衬线字体
|
||||||
|
"Source Serif 4"
|
||||||
|
# 中文: 黑体
|
||||||
|
"Source Han Sans SC"
|
||||||
|
"Source Han Sans TC"
|
||||||
|
];
|
||||||
|
# 等宽字体
|
||||||
|
monospace = [
|
||||||
|
# 英文
|
||||||
|
"JetBrainsMono Nerd Font"
|
||||||
|
# 中文
|
||||||
|
"WenQuanYi Micro Hei Mono"
|
||||||
|
];
|
||||||
emoji = ["Noto Color Emoji"];
|
emoji = ["Noto Color Emoji"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -53,14 +78,19 @@
|
|||||||
# It supports a richer feature set than the standard linux console VT,
|
# It supports a richer feature set than the standard linux console VT,
|
||||||
# including full unicode support, and when the video card supports drm should be much faster.
|
# including full unicode support, and when the video card supports drm should be much faster.
|
||||||
enable = true;
|
enable = true;
|
||||||
fonts = [
|
fonts = with pkgs; [
|
||||||
{
|
{
|
||||||
name = "Source Code Pro";
|
name = "Source Code Pro";
|
||||||
package = pkgs.source-code-pro;
|
package = source-code-pro;
|
||||||
|
}
|
||||||
|
# CJK font
|
||||||
|
{
|
||||||
|
name = "WenQuanYi Micro Hei Mono";
|
||||||
|
package = wqy_microhei;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
extraOptions = "--term xterm-256color";
|
extraOptions = "--term xterm-256color";
|
||||||
extraConfig = "font-size=12";
|
extraConfig = "font-size=14";
|
||||||
# Whether to use 3D hardware acceleration to render the console.
|
# Whether to use 3D hardware acceleration to render the console.
|
||||||
hwRender = true;
|
hwRender = true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user