mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:29:40 +00:00
103 lines
3 KiB
Nix
103 lines
3 KiB
Nix
{
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
#
|
|
# fonts
|
|
#
|
|
fonts.fontconfig = {
|
|
enable = true;
|
|
defaultFonts = {
|
|
sansSerif = [
|
|
"Ubuntu"
|
|
"Noto Sans CJK TC"
|
|
];
|
|
serif = [ "Noto Serif CJK TC" ];
|
|
monospace = [ "IosevkaIBMPlexMono" ];
|
|
emoji = [ "Noto Color Emoji" ];
|
|
};
|
|
|
|
configFile = {
|
|
thick-iosevka = {
|
|
enable = true;
|
|
# https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
|
|
# https://gist.github.com/yuttie/adb22a6c07ef8e75d82e48d5484b7ad8
|
|
# https://github.com/N1k3YB/CS2FontChanger_ru/blob/5f1d8189220f42286d773c536ff83a49b2556da2/app.py#L227
|
|
#
|
|
# Use the following script to test
|
|
# for size in (seq 9 15)
|
|
# echo
|
|
# echo
|
|
# for weight in {regular,medium,bold}
|
|
# echo "weight=$weight:size=$size"
|
|
# fc-match "mono:weight=$weight:size=$size"
|
|
# end
|
|
# end | less
|
|
text = /* xml */ ''
|
|
<?xml version="1.0"?>
|
|
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
|
<fontconfig>
|
|
<match target="pattern">
|
|
<test name="family" compare="contains"><string>Iosevka</string></test>
|
|
<edit name="weight" mode="assign" binding="strong">
|
|
<if> <eq><name>weight</name><const>bold</const></eq> <!-- then --> <const>bold</const>
|
|
<if> <eq><name>weight</name><const>medium</const></eq> <!-- then --> <const>medium</const>
|
|
<!-- not bold nor medium -->
|
|
<if> <more><name>size</name><double>15</double></more> <!-- then --> <const>regular</const>
|
|
<if> <more><name>size</name><double>10</double></more> <!-- then --> <const>medium</const>
|
|
<!-- else --> <const>bold</const>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</edit>
|
|
</match>
|
|
</fontconfig>
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
home.packages = [
|
|
pkgs.noto-fonts
|
|
pkgs.noto-fonts-lgc-plus
|
|
pkgs.noto-fonts-cjk-sans
|
|
pkgs.noto-fonts-cjk-serif
|
|
pkgs.noto-fonts-color-emoji
|
|
pkgs.noto-fonts-emoji-blob-bin
|
|
pkgs.ubuntu-classic
|
|
pkgs.IosevkaIBMPlexMono
|
|
];
|
|
|
|
home.file = {
|
|
".xscreensaver".source = "${./xscreensaver/.xscreensaver}";
|
|
".wallpaper".source = "${pkgs.wallpapers.packages.serial_experiments_lain.lain_windows_error}";
|
|
};
|
|
xdg.configFile = {
|
|
"xmonad".source = "${./xmonad}";
|
|
};
|
|
home.pointerCursor = {
|
|
x11.enable = true;
|
|
gtk.enable = true;
|
|
name = "Posy_Cursor_Black";
|
|
package = pkgs.posy-cursors;
|
|
size = 72;
|
|
};
|
|
xresources.properties."Xft.dpi" = 150;
|
|
i18n.inputMethod = {
|
|
enable = true;
|
|
type = "fcitx5";
|
|
};
|
|
|
|
xdg.mimeApps =
|
|
let
|
|
associations = {
|
|
"x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ];
|
|
};
|
|
in
|
|
{
|
|
enable = true;
|
|
associations.added = associations;
|
|
defaultApplications = associations;
|
|
};
|
|
}
|