add custom fonts
This commit is contained in:
parent
9a191aa52c
commit
b652b54e31
3 changed files with 15 additions and 1 deletions
BIN
config/fonts/fangsong.ttf
Normal file
BIN
config/fonts/fangsong.ttf
Normal file
Binary file not shown.
|
|
@ -1,5 +1,17 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Custom fonts from local files
|
||||||
|
customFonts = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = "custom-fonts";
|
||||||
|
src = ../config/fonts;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/fonts
|
||||||
|
find $src -type f \( -name "*.ttf" -o -name "*.otf" -o -name "*.ttc" -o -name "*.woff" -o -name "*.woff2" \) -exec cp {} $out/share/fonts/ \;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Font packages
|
# Font packages
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
@ -22,6 +34,9 @@
|
||||||
arphic-ukai # KaiTi style (楷体) - brush stroke style
|
arphic-ukai # KaiTi style (楷体) - brush stroke style
|
||||||
arphic-uming # MingTi/Song style (宋体) - serif style
|
arphic-uming # MingTi/Song style (宋体) - serif style
|
||||||
wqy_zenhei # WenQuanYi Zen Hei - popular sans-serif with good coverage
|
wqy_zenhei # WenQuanYi Zen Hei - popular sans-serif with good coverage
|
||||||
|
|
||||||
|
# Custom fonts from config/fonts directory
|
||||||
|
customFonts
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable font configuration
|
# Enable font configuration
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ in
|
||||||
main = {
|
main = {
|
||||||
capslock = "leftcontrol";
|
capslock = "leftcontrol";
|
||||||
leftalt = "leftmeta";
|
leftalt = "leftmeta";
|
||||||
leftmeta = "leftalt";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue