From bc67b4226f20567001ca76a585a903920f7d0774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 23 Jan 2026 01:41:44 +0100 Subject: [PATCH 1/6] overlays/iosevka: refactor family name in spacing overlay --- nix/overlays/iosevka/default.nix | 5 ++--- nix/overlays/iosevka/spacings.nix | 24 ++++++++++++------------ nix/overlays/iosevka/variants.nix | 4 ++-- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/nix/overlays/iosevka/default.nix b/nix/overlays/iosevka/default.nix index bd107471..236e7059 100644 --- a/nix/overlays/iosevka/default.nix +++ b/nix/overlays/iosevka/default.nix @@ -38,7 +38,7 @@ let ] ) [ - (import ./spacings.nix { inherit lib; }) + (import ./spacings.nix) ([ identityOverlay ] ++ import ./variants.nix) ]; @@ -46,9 +46,8 @@ let overlay: let mergedConfig = lib.fix (lib.extends overlay iosevkaConfig); - toKebabCase = x: builtins.replaceStrings [ " " ] [ "-" ] (lib.toLower x); in - lib.nameValuePair (toKebabCase mergedConfig.family) (mkIosevka mergedConfig) + lib.nameValuePair mergedConfig.family (mkIosevka mergedConfig) ); iosevka-nerds = builtins.mapAttrs (_: mkNerdFont) iosevkas; diff --git a/nix/overlays/iosevka/spacings.nix b/nix/overlays/iosevka/spacings.nix index 2f454a5a..3a70de9b 100644 --- a/nix/overlays/iosevka/spacings.nix +++ b/nix/overlays/iosevka/spacings.nix @@ -1,24 +1,24 @@ -{ lib }: - let list = [ - { spacing = "normal"; } + { + adjustFamily = old: old; + spacing = "normal"; + } # Iosevka + Ghostty makes "…" display in a odd way. # We use "term" width to avoid this. # https://github.com/ghostty-org/ghostty/discussions/10335 - { spacing = "term"; } + { + adjustFamily = old: old + "Term"; + spacing = "term"; + } ]; in map ( - { spacing }@cfg: - let - name = lib.toSentenceCase spacing; - in - final: prev: - cfg - // { - family = prev.family + "-${name}"; + { adjustFamily, spacing }: + final: prev: { + family = adjustFamily prev.family; + inherit spacing; } ) list diff --git a/nix/overlays/iosevka/variants.nix b/nix/overlays/iosevka/variants.nix index 883d63da..fce85d4a 100644 --- a/nix/overlays/iosevka/variants.nix +++ b/nix/overlays/iosevka/variants.nix @@ -82,10 +82,10 @@ in map ( { name, code }: let - kebabName = builtins.replaceStrings [ " " ] [ "-" ] name; + shortName = builtins.replaceStrings [ " " ] [ "" ] name; in final: prev: { - family = prev.family + "-${kebabName}"; + family = prev.family + "${shortName}"; variants = prev.variants // { inherits = code; }; From 8cb87dff9b20183a7bc8255129f12b851d63f335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 23 Jan 2026 01:45:14 +0100 Subject: [PATCH 2/6] vanadium: rename usages of iosevka font --- nix/configurations/vanadium/home/misc.nix | 4 ++-- nix/configurations/vanadium/home/xmobar/xmobar.hs | 2 +- nix/homeModules/common/ghostty.nix | 4 ++-- nix/homeModules/common/wired/default.nix | 2 +- nix/homeModules/common/wired/wired.ron | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index 2e75755e..2577e970 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -14,7 +14,7 @@ "Noto Sans CJK TC" ]; serif = [ "Noto Serif CJK TC" ]; - monospace = [ "Iosevka-Normal-PT-Mono" ]; + monospace = [ "IosevkaPTMono" ]; emoji = [ "Noto Color Emoji" ]; }; }; @@ -26,7 +26,7 @@ pkgs.noto-fonts-color-emoji pkgs.noto-fonts-emoji-blob-bin pkgs.ubuntu-classic - pkgs.iosevka-normal-pt-mono + pkgs.IosevkaPTMono ]; home.file = { diff --git a/nix/configurations/vanadium/home/xmobar/xmobar.hs b/nix/configurations/vanadium/home/xmobar/xmobar.hs index 38f83c6b..0157b8bd 100644 --- a/nix/configurations/vanadium/home/xmobar/xmobar.hs +++ b/nix/configurations/vanadium/home/xmobar/xmobar.hs @@ -54,7 +54,7 @@ config = -- For framework 13 , dpi = 150 - , font = "Iosevka-Normal-PT-Mono 8" + , font = "IosevkaPTMono 8" , fgColor = "#FFFFFF" , bgColor = "#000000" , position = BottomH 24 diff --git a/nix/homeModules/common/ghostty.nix b/nix/homeModules/common/ghostty.nix index 766f1ff3..3dfd6338 100644 --- a/nix/homeModules/common/ghostty.nix +++ b/nix/homeModules/common/ghostty.nix @@ -10,7 +10,7 @@ in { config = lib.mkIf cfg.enable { home.packages = [ - pkgs.nerd-fonts.iosevka-term-pt-mono + pkgs.nerd-fonts.IosevkaTermPTMono ]; programs.ghostty.settings = { @@ -21,7 +21,7 @@ in resize-overlay = "never"; # Fonts - font-family = "Iosevka Term PT Mono NFM"; + font-family = "IosevkaTermPTMono NFM"; adjust-cursor-thickness = 2; keybind = [ "ctrl+shift+==increase_font_size:1" diff --git a/nix/homeModules/common/wired/default.nix b/nix/homeModules/common/wired/default.nix index a0841691..6e253037 100644 --- a/nix/homeModules/common/wired/default.nix +++ b/nix/homeModules/common/wired/default.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - home.packages = [ pkgs.iosevka-normal-pt-mono ]; + home.packages = [ pkgs.IosevkaPTMono ]; services.wired = { config = "${./wired.ron}"; }; diff --git a/nix/homeModules/common/wired/wired.ron b/nix/homeModules/common/wired/wired.ron index 065abc89..05b4f76e 100644 --- a/nix/homeModules/common/wired/wired.ron +++ b/nix/homeModules/common/wired/wired.ron @@ -122,7 +122,7 @@ offset: Vec2(x: 0.0, y: 0.0), params: ScrollingTextBlock(( text: "%s", - font: "Iosevka-Normal-PT-Mono 24", + font: "IosevkaPTMono 24", color: Color(hex: "#fafafa"), padding: Padding(left: 7.0, right: 7.0, top: 1.0, bottom: 0.0), width: (min: 400, max: 400), @@ -140,7 +140,7 @@ offset: Vec2(x: 0.0, y: -3.0), params: ScrollingTextBlock(( text: "%b", - font: "Iosevka-Normal-PT-Mono 18", + font: "IosevkaPTMono 18", color: Color(hex: "#fafafa"), padding: Padding(left: 7.0, right: 7.0, top: 3.0, bottom: 7.0), width: (min: 400, max: 400), From 51d27a224a373cb1b31cfd3d3a1a2b2d58b90f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 23 Jan 2026 01:48:33 +0100 Subject: [PATCH 3/6] overlays/iosevka: document why custom built iosekva is thick --- nix/overlays/iosevka/privateBuildPlan.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nix/overlays/iosevka/privateBuildPlan.nix b/nix/overlays/iosevka/privateBuildPlan.nix index 3ae300fb..a9d727a3 100644 --- a/nix/overlays/iosevka/privateBuildPlan.nix +++ b/nix/overlays/iosevka/privateBuildPlan.nix @@ -26,6 +26,8 @@ }; weights = { + # TODO: This is a workaround for iosevka being too thin at small sizes. + # This should be possible to do with fontconfig # Build 580, but indicate 400 in output Regular.shape = 580; Regular.menu = 400; From e08afde62fd0e53b6d982e5d5b5fcb0d1622a0eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 23 Jan 2026 10:23:04 +0100 Subject: [PATCH 4/6] overlays/iosevka: build default weight --- nix/overlays/iosevka/privateBuildPlan.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nix/overlays/iosevka/privateBuildPlan.nix b/nix/overlays/iosevka/privateBuildPlan.nix index a9d727a3..d4677f26 100644 --- a/nix/overlays/iosevka/privateBuildPlan.nix +++ b/nix/overlays/iosevka/privateBuildPlan.nix @@ -26,12 +26,12 @@ }; weights = { - # TODO: This is a workaround for iosevka being too thin at small sizes. - # This should be possible to do with fontconfig - # Build 580, but indicate 400 in output - Regular.shape = 580; + Regular.shape = 400; Regular.menu = 400; Regular.css = 400; + Medium.shape = 500; + Medium.menu = 500; + Medium.css = 500; Bold.shape = 700; Bold.menu = 700; Bold.css = 700; @@ -41,9 +41,6 @@ Normal.shape = 500; Normal.menu = 5; Normal.css = "normal"; - Extended.shape = 600; - Extended.menu = 7; - Extended.css = "expanded"; }; slopes = { From ae75eae20fcae8d2394a44faef1aff78a4e3c1e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 23 Jan 2026 02:09:23 +0100 Subject: [PATCH 5/6] vanadium: implement conditional fontsize in fontconfig --- nix/configurations/vanadium/home/misc.nix | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index 2577e970..24c1aa1c 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -17,6 +17,46 @@ monospace = [ "IosevkaPTMono" ]; 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 */ '' + + + + + Iosevka + + weightbold bold + weightmedium medium + + size15 regular + size10 medium + bold + + + + + + + + ''; + }; + }; }; home.packages = [ pkgs.noto-fonts From ad6669d42f24bed5fec40ba873630a3303ac16bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Fri, 23 Jan 2026 10:29:01 +0100 Subject: [PATCH 6/6] vanadium/xmonad: correct dmenu font configuration --- nix/configurations/vanadium/home/xmonad/xmonad.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 52d4279c..905f640d 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -351,9 +351,7 @@ keybinds = -- Launcher ++ (let launchFirefox = "zen" - -- dmenu doesn't find the right font, but it falls back to the right one - -- https://bbs.archlinux.org/viewtopic.php?id=139829 - launchDmenu = "dmenu_run -i -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10" + launchDmenu = "dmenu_run -i -fn \"IosevkaPTMono-18\" -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10" lock = "xscreensaver-command -lock" in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" ) , ((controlMask .|. altMask, xK_t), namedScratchpadAction myScratchpads "btop" )