# Ghostty — Nomarchy's default terminal, themed from theme-state.json. # Colors, fonts and the full 16-color ANSI palette are baked from the # JSON at eval time. { config, lib, ... }: let t = config.nomarchy.theme; c = t.colors; in { programs.ghostty = lib.mkIf config.nomarchy.ghostty.enable { enable = true; enableBashIntegration = true; settings = { # ── Typography (from theme-state.json) ──────────────────────── font-family = t.fonts.mono; font-size = t.fonts.size; # ── Colors (from theme-state.json) ──────────────────────────── background = c.base; foreground = c.text; cursor-color = c.accent; selection-background = c.overlay; selection-foreground = c.text; split-divider-color = c.surface; # "N=#rrggbb" entries; Ghostty accepts repeated `palette` keys, # which the HM module renders from this list. palette = lib.imap0 (i: color: "${toString i}=${color}") t.ansi; # ── Chrome ──────────────────────────────────────────────────── # background-opacity is theme-driven (normal priority — use the # CLI); the rest are mkDefault so a plain home.nix value wins. background-opacity = t.ui.terminalOpacity; window-padding-x = lib.mkDefault 12; window-padding-y = lib.mkDefault 12; window-decoration = lib.mkDefault false; gtk-single-instance = lib.mkDefault true; confirm-close-surface = lib.mkDefault false; }; }; }