From af3cfe4b9a29d8ebafdea268849493113b0d5ea6 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Wed, 10 Jun 2026 14:08:06 +0100 Subject: [PATCH] feat(fonts): JetBrains Mono Nerd Font on every host The tmux statusline draws powerline/Nerd glyphs that default fonts lack, so they render as blank/"?". tmux runs on every host (not just the Sway ones), so install the font in the shared common-nixos module rather than swaywm -- a future console-only or non-Sway host gets it too. The Mac installs it via the Darwin config (/Library/Fonts). foot names it as its main font (home/sway.nix). On macOS, iTerm2's font is still a GUI setting: Settings -> Profiles -> Text -> Font -> "JetBrainsMono Nerd Font". Co-Authored-By: Claude Opus 4.8 (1M context) --- lyrathorpe/home/sway.nix | 3 +++ system/machine/Darwin/configuration.nix | 5 +++++ system/modules/common-nixos.nix | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/lyrathorpe/home/sway.nix b/lyrathorpe/home/sway.nix index 118a65f..b5d2623 100644 --- a/lyrathorpe/home/sway.nix +++ b/lyrathorpe/home/sway.nix @@ -237,6 +237,9 @@ in # text). Only colors-dark is needed; we never set initial-color-theme=light. settings = { main = { + # Nerd Font: monospace plus the powerline/Nerd glyphs the tmux + # statusline uses (otherwise they render as blank/"?"). + font = "JetBrainsMono Nerd Font:size=11"; # Advertise as xterm-256color so remote hosts without foot's terminfo # still behave (tmux re-adds foot's RGB/sync/etc. features -- see # shell.nix). The [main] section is the unheadered top of foot.ini. diff --git a/system/machine/Darwin/configuration.nix b/system/machine/Darwin/configuration.nix index 4f54c4e..e894e08 100644 --- a/system/machine/Darwin/configuration.nix +++ b/system/machine/Darwin/configuration.nix @@ -6,6 +6,11 @@ { programs.zsh.enable = true; + # Install the Nerd Font into /Library/Fonts so iTerm2 can use it (set it in + # iTerm2 -> Settings -> Profiles -> Text -> Font: "JetBrainsMono Nerd Font"). + # Provides the powerline/Nerd glyphs the tmux statusline draws. + fonts.packages = [ pkgs.nerd-fonts.jetbrains-mono ]; + # CLI tooling sourced from nixpkgs instead of Homebrew formulae. Pure library # dependencies are omitted; nix pulls them into closures automatically. environment.systemPackages = with pkgs; [ diff --git a/system/modules/common-nixos.nix b/system/modules/common-nixos.nix index 5c4a78d..476aa1e 100644 --- a/system/modules/common-nixos.nix +++ b/system/modules/common-nixos.nix @@ -12,4 +12,10 @@ git fastfetch ]; + + # Terminal font with powerline/Nerd glyphs. Installed on every host because + # the tmux statusline (which uses these glyphs) runs everywhere, not just on + # the Sway/graphical hosts. foot names it explicitly (home/sway.nix); the Mac + # installs it via the Darwin config. + fonts.packages = [ pkgs.nerd-fonts.jetbrains-mono ]; }