Files
nixos-config/modules/user/terminal.nix
T
kiskaadee acc0bd7c80 feat(dev): unify Python tooling and migrate dotfile to declarative
lua/conf files

- Consolidate Python dev stack: Add `postgresql`/`pgcli`,
  `httpie`/`bruno`, and `ruff`/`mypy` to the environment
- Centralize Neovim logic: Move all configuration (`init.lua`,
  `lsp.lua`, `catppuccin.lua`) to standalone files and load them via
  `builtins.readFile`.
- Externalize Tmux configuration: Migrate the monolithic `extraConfig`
  to an external `modules/user/config/tmux.conf` file.
- Configure Zed and Neovim to use `ruff` as the primary Python formatter
  and `pyright` for static analysis.

Rationale: Embeded scripts as strings lack of proper language-specific
syntax highlighting, and makes the configuration harder to read and
understand. Eliminating hardcoded configuration in Nix improves readability,
enables proper syntax highlighting for Lua/Conf files, and standardizes
development tooling across all environments.
2026-06-25 15:07:49 -05:00

67 lines
2.4 KiB
Nix

# 🖥️ Terminal Environment configuration
# Defines user-space preferences for Alacritty, Tmux, and Starship.
{ pkgs, ... }:
{
# GPU-Accelerated Terminal Emulator (Alacritty)
programs.alacritty = {
enable = true;
settings = {
window = {
padding = { x = 10; y = 10; }; # Padding to avoid text hugging window borders
decorations = "none"; # Frameless windows for clean tiling layouts
opacity = 0.95; # Subtle background translucency
};
font = {
# Font settings. (Nerd Font version required for UI icons)
normal = { family = "JetBrainsMono Nerd Font"; style = "Regular"; };
size = 12.0;
};
colors = {
primary = {
background = "#1e1e2e"; # Catppuccin Mocha Base (Dark Theme)
foreground = "#cdd6f4"; # Catppuccin Mocha Text (Light grey)
};
};
};
};
# Terminal Multiplexer (Tmux)
# Allows maintaining persistent shell sessions, window splitting, and tabs.
programs.tmux = {
enable = true;
shortcut = "a"; # Remaps Tmux prefix key to `Ctrl+a` (similar to GNU Screen)
baseIndex = 1; # Sets starting window index to 1 (matching keyboard layout)
newSession = true; # Spawns a new session automatically when calling tmux attach
escapeTime = 0; # Zero latency for Vim mode transitions (removes Esc lag)
mouse = true; # Enables scrollback navigation and pane resizing using the mouse pointer
terminal = "tmux-256color";
plugins = with pkgs.tmuxPlugins; [
catppuccin # Visual styling matching system theme
vim-tmux-navigator # Seamless navigation switching between Vim panes and Tmux splits (Ctrl+h/j/k/l)
];
extraConfig = builtins.readFile ./config/tmux.conf;
};
# Cross-Shell Prompt (Starship)
# A highly customizable, language-aware shell status prompt.
programs.starship = {
enable = true;
enableBashIntegration = true; # Mount prompt configuration inside Bash shells
settings = {
add_newline = false; # Do not add empty lines before the prompt line
character = {
success_symbol = "[➜](bold green)";
error_symbol = "[➜](bold red)";
};
directory = {
style = "bold blue";
truncate_to_repo = true; # Hides directory path prefixes when navigating inside Git repositories
};
};
};
}