aboutsummaryrefslogtreecommitdiffstats
path: root/openspec/changes/archive/2026-09-24-add-jetbrains-mono-nerd-font/design.md
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <tom@vanderlee.com>2026-09-24 13:34:58 +0000
committerGravatar Tom van der Lee <tom@vanderlee.com>2026-09-24 13:34:58 +0000
commita70a7e5ed46e6671a64c94698f70ceb210eff7cd (patch)
treee8050b592a7d1f6b5d2cdd66ab052b5e9a31659b /openspec/changes/archive/2026-09-24-add-jetbrains-mono-nerd-font/design.md
parent096e82ca45a5360b4b2dd084e0fb1a937a227a69 (diff)
downloaddesktop-flake-a70a7e5ed46e6671a64c94698f70ceb210eff7cd.tar.gz
desktop-flake-a70a7e5ed46e6671a64c94698f70ceb210eff7cd.tar.bz2
desktop-flake-a70a7e5ed46e6671a64c94698f70ceb210eff7cd.zip
Provision the JetBrains Mono Nerd Font via the shared home profile
Ghostty and Neovim both render glyphs (statusline icons, file-tree icons) that need a Nerd Font, and no font was previously provisioned at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'openspec/changes/archive/2026-09-24-add-jetbrains-mono-nerd-font/design.md')
-rw-r--r--openspec/changes/archive/2026-09-24-add-jetbrains-mono-nerd-font/design.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/openspec/changes/archive/2026-09-24-add-jetbrains-mono-nerd-font/design.md b/openspec/changes/archive/2026-09-24-add-jetbrains-mono-nerd-font/design.md
new file mode 100644
index 0000000..528a4d7
--- /dev/null
+++ b/openspec/changes/archive/2026-09-24-add-jetbrains-mono-nerd-font/design.md
@@ -0,0 +1,36 @@
1## Context
2
3See proposal.md - Why. This is a single-package addition to `modules/home/`, the shared cross-platform profile described in `CLAUDE.md`. That file documents two established patterns this design reuses rather than inventing new ones:
4- `lib.meta.availableOn pkgs.stdenv.hostPlatform`, filtered over a candidate list, for package availability differences (used today in `modules/home/desktop-apps.nix`).
5- Platform checks (`pkgs.stdenv.hostPlatform.isLinux`/`isDarwin`) for platform-only differences.
6
7Confirmed against the pinned `nixpkgs` (`nixos-unstable`, see `flake.nix`): `pkgs.nerd-fonts.jetbrains-mono` exists, but its `meta.platforms` excludes `x86_64-darwin` while including `aarch64-darwin`, `x86_64-linux`, and `aarch64-linux` (and effectively everything else). None of this flake's actual `homeConfigurations` (`tom@linux` = `x86_64-linux`, `tom@darwin` = `aarch64-darwin`) or `nixosConfigurations` (`test-vm` = `aarch64-linux`) target `x86_64-darwin` today, so this gap is latent, not currently triggered - but the flake's `devShells`/`formatter` outputs do cover `x86_64-darwin` via `forAllSystems`, and a future `homeConfigurations."tom@darwin-intel"` (or similar) would hit it immediately without a guard.
8
9Font delivery differs by platform in home-manager itself, independent of anything this repo needs to write:
10- On Linux, fontconfig-based apps discover fonts placed under `home.packages` only once `fonts.fontconfig.enable` is on. Home-manager defaults that option to `nixosConfig.fonts.fontconfig.enable` when running as a NixOS submodule with `useUserPackages` (this flake's `mkNixos` wiring) - which is `true` by NixOS's own default - but defaults to `false` for a standalone (non-NixOS) activation, where `nixosConfig` is null.
11- On Darwin, home-manager's built-in `targets.darwin.fonts` module (unconditional on `pkgs.stdenv.hostPlatform.isDarwin`, not gated by `fonts.fontconfig.enable`) already rsyncs any font found in `home.packages` into `~/Library/Fonts/HomeManager` on every activation.
12
13## Goals / Non-Goals
14
15**Goals:**
16- Provision the JetBrains Mono Nerd Font through the shared home-manager profile on every platform the pinned nixpkgs supports it on.
17- Make the font discoverable by fontconfig-based apps (Ghostty, Neovim's GUI-adjacent tooling) on Linux, standalone or NixOS-hosted, without relying on the NixOS-submodule-derived default.
18- Skip cleanly, not fail evaluation, on a platform without a supported build.
19
20**Non-Goals:**
21- Configuring Ghostty or Neovim to actually *use* the font (`font-family` in Ghostty's config, `guifont`, etc.) - those are dotfiles-repo-owned per `modules/home/dotfiles.nix`'s Stow model, outside this shared profile's remit.
22- Provisioning any other typeface. The `fonts` capability is scoped to this one font for now; broadening it is a future change.
23- Any NixOS-level (`modules/nixos/common.nix`) font configuration - system-level `fonts.packages` is a separate, unused mechanism here; everything goes through the home-manager profile per this repo's existing GUI-package pattern.
24
25## Decisions
26
27**New `modules/home/fonts.nix`, imported from `modules/home/default.nix`.** Mirrors the existing per-concern module layout (`desktop-apps.nix`, `editor.nix`, etc.) rather than folding the font into an existing file - fonts are a distinct concern from GUI applications or the editor toolchain, and a dedicated `fonts` capability needs a dedicated spec-to-code mapping.
28
29**Filter through `lib.meta.availableOn pkgs.stdenv.hostPlatform` even for a single-package list.** Alternative considered: skip the filter since only one font package exists today and none of the currently-defined outputs hit the unsupported platform. Rejected because the gap is real (confirmed above) and the guard is a one-line reuse of an already-established, already-imported pattern (`desktop-apps.nix` imports `lib` for the same purpose) - cheaper than the risk of a future Darwin-Intel host hitting an eval failure.
30
31**Set `fonts.fontconfig.enable = true;` unconditionally (no `osConfig`/platform guard).** This option is home-manager-internal and platform-safe on its own: it's a no-op contributor on Darwin (fontconfig isn't the font-discovery path there; `targets.darwin.fonts` handles that unconditionally regardless of this option) and is idempotent on NixOS (already defaults to `true` there via the `useUserPackages` derivation). Setting it explicitly, rather than relying on that implicit default, documents the intent directly in this repo's own module and keeps standalone Linux behavior correct without depending on NixOS-side wiring. Alternative considered: gate it behind `pkgs.stdenv.hostPlatform.isLinux` for clarity - rejected as unnecessary ceremony since the option is inert (not merely ignored, but literally unused) on Darwin.
32
33## Risks / Trade-offs
34
35- [`nerd-fonts.jetbrains-mono` has no `x86_64-darwin` build in the pinned nixpkgs] → Mitigated by the `lib.meta.availableOn` filter; the package silently drops out there instead of failing `nix flake check` or a build, consistent with the `desktop-applications` capability's existing unsupported-package handling.
36- [nixpkgs restructures or renames the `nerd-fonts.*` package set in a future `nixpkgs-unstable` bump] → Would surface as an eval error on the next `nix flake check` / `flake.lock` update, same exposure as any other pinned package reference in this repo; no special handling proposed here.