feat: Add some dummy fonts
This commit is contained in:
parent
a9e9916499
commit
0e866d659b
20 changed files with 285 additions and 37 deletions
|
|
@ -2,6 +2,7 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
rootPath,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.gui;
|
||||
|
|
@ -31,6 +32,19 @@ in {
|
|||
package = pkgs.firefox-beta;
|
||||
};
|
||||
|
||||
sops.secrets = with lib;
|
||||
with builtins;
|
||||
pipe (rootPath + "/secrets/dummy_font") [
|
||||
readDir
|
||||
attrNames
|
||||
(flip genAttrs (name: {
|
||||
sopsFile = rootPath + "/secrets/dummy_font/${name}";
|
||||
format = "binary";
|
||||
path = "/run/fonts/${name}";
|
||||
mode = "0444";
|
||||
}))
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
|
|
@ -44,23 +58,35 @@ in {
|
|||
noto-fonts-cjk-serif
|
||||
noto-fonts
|
||||
];
|
||||
fontconfig.defaultFonts = {
|
||||
serif = [
|
||||
"Libertinus Serif"
|
||||
"Source Han Serif"
|
||||
"Noto Serif CJK SC"
|
||||
];
|
||||
sansSerif = [
|
||||
"Source Han Sans"
|
||||
"Noto Sans CJK SC"
|
||||
];
|
||||
monospace = [
|
||||
"Maple Mono NF CN"
|
||||
"Noto Sans Mono SC"
|
||||
];
|
||||
emoji = [
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
fontconfig = {
|
||||
localConf =
|
||||
#xml
|
||||
''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<dir>/run/fonts</dir>
|
||||
</fontconfig>
|
||||
'';
|
||||
defaultFonts = {
|
||||
serif = [
|
||||
"Libertinus Serif"
|
||||
"Source Han Serif"
|
||||
"Noto Serif CJK SC"
|
||||
];
|
||||
sansSerif = [
|
||||
"Source Han Sans"
|
||||
"Noto Sans CJK SC"
|
||||
];
|
||||
monospace = [
|
||||
"MonoLisa"
|
||||
"Maple Mono NF CN"
|
||||
"Noto Sans Mono SC"
|
||||
];
|
||||
emoji = [
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ in {
|
|||
config = lib.mkIf cfg.enable {
|
||||
i18n = {
|
||||
defaultLocale = "C.UTF-8";
|
||||
extraLocales = ["zh_CN.UTF-8/UTF-8"];
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "zh_CN.UTF-8";
|
||||
LC_IDENTIFICATION = "zh_CN.UTF-8";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue