.files/nix/configurations/vanadium/home/misc.nix
Léana 江 26acc21d31
vanadium: use iosevka default
It seems like I like the original the most <3
2026-01-23 19:06:36 +01:00

103 lines
3 KiB
Nix

{
pkgs,
...
}:
{
#
# fonts
#
fonts.fontconfig = {
enable = true;
defaultFonts = {
sansSerif = [
"Ubuntu"
"Noto Sans CJK TC"
];
serif = [ "Noto Serif CJK TC" ];
monospace = [ "Iosevka" ];
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.Iosevka
];
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;
};
}