整理字体设置

This commit is contained in:
陈浩南 2023-07-26 17:03:09 +08:00
parent 05b4bdf491
commit eea2495e2f
3 changed files with 20 additions and 17 deletions

View File

@ -238,13 +238,13 @@
{
impermanence.enable = true;
snapper = { enable = true; configs.persistent = "/nix/persistent"; };
fontconfig.enable = true;
};
};
boot.kernelParams = [ "i915.force_probe=46a6" ];
}; })
./modules/basic.nix
./modules/fonts.nix
./modules/sops.nix
[ ./modules/hardware/nvidia-prime.nix { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; } ]
./modules/hardware/chn-PC.nix

View File

@ -1,16 +0,0 @@
inputs:
{
config.fonts =
{
fontDir.enable = true;
fonts = with inputs.pkgs;
[ noto-fonts source-han-sans source-han-serif source-code-pro hack-font jetbrains-mono nerdfonts ];
fontconfig.defaultFonts =
{
emoji = [ "Noto Color Emoji" ];
monospace = [ "Noto Sans Mono CJK SC" "Sarasa Mono SC" "DejaVu Sans Mono"];
sansSerif = [ "Noto Sans CJK SC" "Source Han Sans SC" "DejaVu Sans" ];
serif = [ "Noto Serif CJK SC" "Source Han Serif SC" "DejaVu Serif" ];
};
};
}

View File

@ -13,6 +13,7 @@ inputs:
configs = mkOption { type = types.attrsOf types.nonEmptyStr; default = {}; };
};
kmscon.enable = mkOption { type = types.bool; default = false; };
fontconfig.enable = mkOption { type = types.bool; default = false; };
};
config = let inherit (inputs.lib) mkMerge mkIf; inherit (inputs.localLib) stripeTabs attrsToList; in mkMerge
[
@ -75,5 +76,23 @@ inputs:
};
}
)
(
mkIf inputs.config.nixos.services.fontconfig.enable
{
fonts =
{
fontDir.enable = true;
fonts = with inputs.pkgs;
[ noto-fonts source-han-sans source-han-serif source-code-pro hack-font jetbrains-mono nerdfonts ];
fontconfig.defaultFonts =
{
emoji = [ "Noto Color Emoji" ];
monospace = [ "Noto Sans Mono CJK SC" "Sarasa Mono SC" "DejaVu Sans Mono"];
sansSerif = [ "Noto Sans CJK SC" "Source Han Sans SC" "DejaVu Sans" ];
serif = [ "Noto Serif CJK SC" "Source Han Serif SC" "DejaVu Serif" ];
};
};
}
)
];
}