As a programmer, I spend a lot of my time in a terminal, so it better be configured right.
{ config, lib, ... }:
let
cfg = config.mjm.terminal;
in
{
options.mjm.terminal = {
<<options>>
};
config = lib.mkIf cfg.enable {
<<config>>
};
_class = "homeManager";
}enable = lib.mkEnableOption "terminal";
Terminal configuration needs to be enabled explicitly. Usually this will be done in the desktop module, since that's where a terminal emulator is useful.
font.family = lib.mkOption {
type = lib.types.str;
default = "Maple Mono";
};
font.size = lib.mkOption {
type = lib.types.int;
default = 10;
};These options configure the font family and size used in any terminal emulator. I've switched between several different terminals and fonts over time, so it's nice to have this configured in one common place.
programs.ghostty.enable = true;
programs.ghostty.settings = {
<<ghostty-config>>
};I've been using Ghostty exclusively for a while now. I think it's the best terminal emulator, at least for the things I care about.
theme = "Dracula";
I mostly use Catppuccin themes for everything, but for a few things I've been favoring Dracula lately. Ghostty is one of those things.
font-family = cfg.font.family; font-size = cfg.font.size;
The font family and size are set based on the module options. The size in particular might be adjusted for different machines, since they all have different displays which might have a different size that is comfortable to read.
gtk-titlebar-style = "tabs";
On Linux, stick the tabs in the titlebar. This compacts things and generally looks better to my eyes.
text/gemini;lang=en-USThis content has been proxied by September (UNKNO).