A new role (separate from base) that gives workstation-class hosts (ubongo now, mamba later) a clean interactive environment: zsh + oh-my-zsh + oh-my-posh, tmux + TPM plugins, and neovim. Dotfiles are real files deployed via GNU stow (not templated); pinned nvim v0.12.2 + oh-my-posh 29.0.1. Configs re-derived (ADR-013) from AnsibleBaobabV4 + the operator's fisi setup on boma's terms: no Nerd Font (headless host), no system LSP suite (nvim uses mason), versions pinned (V4 tracks latest). Applied via playbooks/workstation.yml to the control group for users sjat + claude. Lint + Molecule (idempotent) green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
55 lines
1.3 KiB
Bash
55 lines
1.3 KiB
Bash
# ---- managed by boma dev_env role (stow) ----
|
|
# If Oh My Zsh is installed, point ZSH and load it; otherwise pure zsh.
|
|
export ZSH="$HOME/.oh-my-zsh"
|
|
|
|
ZSH_THEME="robbyrussell"
|
|
plugins=(git history sudo zsh-autosuggestions zsh-syntax-highlighting)
|
|
|
|
if [ -d "$ZSH" ]; then
|
|
source "$ZSH/oh-my-zsh.sh"
|
|
fi
|
|
|
|
# Oh My Posh prompt (preferred)
|
|
if command -v oh-my-posh >/dev/null 2>&1; then
|
|
eval "$(oh-my-posh init zsh --config /etc/oh-my-posh/zen.toml)"
|
|
fi
|
|
|
|
# Terminal title
|
|
function set_terminal_title {
|
|
echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"
|
|
}
|
|
precmd() { set_terminal_title }
|
|
|
|
# Aliases and basics
|
|
alias ll="ls -lh"
|
|
alias la="ls -lha"
|
|
alias ..="cd .."
|
|
alias update="sudo apt update && sudo apt upgrade -y"
|
|
alias rclone="/usr/bin/rclone"
|
|
|
|
# Use neovim for vim/vi commands
|
|
alias vim='nvim'
|
|
alias vi='nvim'
|
|
|
|
# History
|
|
HISTFILE="$HOME/.zsh_history"
|
|
HISTSIZE=10000
|
|
SAVEHIST=10000
|
|
setopt inc_append_history share_history
|
|
|
|
# Completion/globbing
|
|
autoload -Uz compinit
|
|
compinit
|
|
setopt autocd correct globdots no_beep
|
|
|
|
# Editor & PATH
|
|
export EDITOR="/usr/local/bin/nvim"
|
|
export VISUAL="/usr/local/bin/nvim"
|
|
export PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
|
|
|
# Ensure USER is set (edge cases)
|
|
export USER=$(whoami)
|
|
|
|
# Extras from inventory
|
|
# Enable direnv for automatic virtualenv activation
|
|
eval "$(direnv hook zsh)"
|