System Configuration
Configure Git settings, SSH keys, terminal preferences, and global system settings
System Configuration
The system.yaml file manages global system settings including Git configuration, SSH settings, terminal preferences, and global themes. These settings provide the foundation for a consistent development environment.
File Location
# Default configuration
~/.local/share/devex/config/system.yaml
# User override (higher priority)
~/.devex/system.yamlFile Structure
git:
aliases: # Git command aliases
co: 'checkout'
br: 'branch'
# ... more aliases
settings: # Git configuration settings
pull:
rebase: true
# ... more settings
ssh: {} # SSH configuration (extensible)
terminal: {} # Terminal configuration (extensible)
global_theme: 'Tokyo Night' # Global theme preferenceGit Configuration
DevEx manages Git settings including aliases, configuration options, and global behavior settings.
Git Aliases
Common Git command shortcuts that improve productivity:
git:
aliases:
# Basic commands
co: 'checkout'
br: 'branch'
ci: 'commit'
st: 'status'
# Advanced shortcuts
unstage: 'reset HEAD --'
last: 'log -1 HEAD'
visual: '!gitk'
# Branch management
switch: 'checkout'
new-branch: 'checkout -b'
delete-branch: 'branch -d'
# Log and history
lg: 'log --oneline --graph --decorate --all'
ll: 'log --oneline'
hist: 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
# Diff shortcuts
dt: 'difftool'
mt: 'mergetool'Git Settings
Global Git configuration that applies to all repositories:
git:
settings:
# Rebase by default when pulling
pull:
rebase: true
# Automatically setup tracking branches
push:
default: 'current'
autoSetupRemote: true
# Branch management
branch:
autosetupmerge: 'always'
autosetuprebase: 'always'
# Automatically prune deleted remote branches
fetch:
prune: trueComplete Git Configuration Example
git:
aliases:
# Essential shortcuts
co: 'checkout'
br: 'branch'
ci: 'commit'
st: 'status'
unstage: 'reset HEAD --'
# Workflow aliases
switch: 'checkout'
new: 'checkout -b'
save: 'commit -am'
undo: 'reset --soft HEAD~1'
# Logging and history
lg: 'log --oneline --graph --decorate --all'
hist: 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
last: 'log -1 HEAD'
# Branch operations
branches: 'branch -a'
remotes: 'remote -v'
settings:
# Workflow settings
pull:
rebase: true
push:
default: 'current'
autoSetupRemote: true
branch:
autosetupmerge: 'always'
autosetuprebase: 'always'
fetch:
prune: true
# Merge and diff
merge:
conflictstyle: 'diff3'
diff:
colorMoved: 'default'
# Core settings
core:
editor: 'code --wait'
autocrlf: false # Consistent line endings
safecrlf: true
# Color settings
color:
ui: 'auto'
branch: 'auto'
diff: 'auto'
status: 'auto'SSH Configuration
SSH settings for secure connections to remote repositories and servers.
Current Structure
ssh: {} # Empty object - ready for extensionPlanned SSH Features
SSH Key Management: Automatic SSH key generation and configuration
Host Configuration: Common SSH host configurations for development
Security Settings: SSH security best practices and hardening
Agent Configuration: SSH agent setup and key forwarding
Future SSH Configuration
# Planned SSH configuration structure
ssh:
# SSH key management
keys:
- name: 'github'
type: 'ed25519'
comment: 'GitHub key for development'
file: '~/.ssh/id_ed25519_github'
- name: 'work'
type: 'rsa'
bits: 4096
comment: 'Work server access'
file: '~/.ssh/id_rsa_work'
# Host configurations
hosts:
- host: 'github.com'
hostname: 'github.com'
user: 'git'
identityFile: '~/.ssh/id_ed25519_github'
- host: 'work-server'
hostname: 'work.example.com'
user: 'developer'
port: 2222
identityFile: '~/.ssh/id_rsa_work'
# Global SSH settings
settings:
addKeysToAgent: 'yes'
useKeychain: 'yes' # macOS
serverAliveInterval: 60
compression: 'yes'Terminal Configuration
Terminal-specific settings and preferences for consistent command-line experience.
Current Structure
terminal: {} # Empty object - ready for extensionPlanned Terminal Features
Profile Management: Terminal profiles with themes and fonts
Shell Integration: Shell-specific configurations and prompt themes
Color Schemes: Terminal color themes matching global themes
Keybindings: Consistent terminal shortcuts across platforms
Future Terminal Configuration
# Planned terminal configuration structure
terminal:
# Default terminal preferences
default_shell: '/bin/zsh'
# Terminal profiles
profiles:
- name: 'Development'
font: 'JetBrainsMono Nerd Font'
font_size: 12
theme: 'tokyo-night'
opacity: 0.95
- name: 'Presentation'
font: 'CascadiaMono Nerd Font'
font_size: 16
theme: 'light'
opacity: 1.0
# Color schemes
themes:
- name: 'tokyo-night'
background: '#1a1b26'
foreground: '#c0caf5'
colors:
black: '#15161e'
red: '#f7768e'
# ... more colors
# Keybindings
keybindings:
- key: 'ctrl+shift+t'
action: 'new_tab'
- key: 'ctrl+shift+w'
action: 'close_tab'Global Theme Management
The global theme preference coordinates color schemes across all applications.
Theme Configuration
global_theme: 'Tokyo Night'Supported Themes
Tokyo Night
Dark theme with purple accents
Kanagawa
Inspired by Japanese wave painting
Gruvbox
Retro groove color scheme
Catppuccin
Soothing pastel theme
Theme Integration
The global theme setting influences:
- Neovim colorschemes: Automatically set matching Neovim themes
- Terminal themes: Terminal color schemes
- Desktop themes: GNOME/KDE theme selection
- VS Code themes: Editor theme preferences
- Application themes: Consistent theming across development tools
# Theme affects multiple configurations
global_theme: 'Tokyo Night'
# This influences:
# - ~/.config/nvim/colorscheme.lua
# - ~/.config/gnome/theme-settings
# - ~/.config/Code/User/settings.json (workbench.colorTheme)
# - ~/.config/alacritty/alacritty.yml (colors)Real-World Configuration Examples
Team Development Setup
# Standardized team configuration
git:
aliases:
# Team-agreed shortcuts
co: 'checkout'
br: 'branch'
ci: 'commit'
st: 'status'
# Workflow aliases
sync: 'pull --rebase origin main'
publish: 'push -u origin HEAD'
wip: 'commit -m "WIP: work in progress"'
settings:
# Consistent workflow
pull:
rebase: true
push:
default: 'current'
autoSetupRemote: true
branch:
autosetupmerge: 'always'
# Code review settings
merge:
conflictstyle: 'diff3'
diff:
tool: 'vscode'
difftool:
prompt: false
global_theme: 'Tokyo Night' # Team standard themeSolo Developer Setup
git:
aliases:
# Personal productivity shortcuts
co: 'checkout'
br: 'branch'
ci: 'commit'
st: 'status'
# Extended personal aliases
unstage: 'reset HEAD --'
uncommit: 'reset --soft HEAD~1'
recommit: 'commit --amend --no-edit'
# Advanced logging
lg: 'log --oneline --graph --decorate --all'
tree: 'log --graph --pretty=format:"%h -%d %s (%cr) <%an>" --abbrev-commit --all'
# Cleanup aliases
cleanup: 'branch --merged | grep -v "\\*\\|main\\|master" | xargs -n 1 git branch -d'
prune-remote: 'remote prune origin'
settings:
pull:
rebase: true
push:
default: 'current'
autoSetupRemote: true
fetch:
prune: true
# Personal preferences
core:
editor: 'nvim'
commit:
template: '~/.gitmessage' # Custom commit template
global_theme: 'Gruvbox' # Personal preferenceOpen Source Contributor Setup
git:
aliases:
# Open source workflow
co: 'checkout'
br: 'branch'
ci: 'commit'
st: 'status'
# Fork workflow
upstream: 'remote add upstream'
sync-upstream: 'fetch upstream && checkout main && merge upstream/main'
feature: 'checkout -b feature/'
# Contribution helpers
review: 'log --oneline --graph origin/main..HEAD'
signoff: 'commit --signoff'
settings:
pull:
rebase: true
push:
default: 'current'
# Contribution settings
commit:
gpgsign: true # Sign commits
user:
signingkey: 'YOUR_GPG_KEY'
# Clean commit history
rebase:
autoStash: true
autoSquash: true
global_theme: 'Catppuccin'Configuration Management
Git Configuration Files
DevEx manages these Git configuration locations:
# Global Git config (managed by DevEx)
~/.gitconfig
# Repository-specific configs (user-managed)
project-dir/.git/config
# System-wide config (admin-managed)
/etc/gitconfigConfiguration Precedence
- Repository-specific (
.git/config) - Highest priority - User global (
~/.gitconfig) - DevEx managed - System-wide (
/etc/gitconfig) - Lowest priority
Applying System Configuration
# Apply all system configurations
devex system apply
# Apply only Git settings
devex system apply --git
# Preview changes (dry-run)
devex system apply --dry-run
# Check current Git configuration
git config --list --show-originValidation and Testing
Configuration Validation
# Validate system configuration
devex config validate system
# Test Git configuration
git config --list | grep alias
git config --list | grep pull.rebase
# Verify SSH configuration
ssh -T git@github.com
# Test terminal configuration
echo $SHELLGit Configuration Testing
# Test Git aliases
git co --help # Should show checkout help
git br # Should list branches
git lg # Should show graph log
# List all configured aliases
git config --get-regexp aliasTroubleshooting
# Reset Git configuration
git config --global --unset-all alias.co
git config --global --unset pull.rebase
# Check configuration conflicts
git config --list --show-origin | grep pull.rebase
# Debug Git operations
GIT_TRACE=1 git pull
# Repair repository
git fsck
git gc --prune=nowBest Practices
System Configuration Best Practices:
- Use meaningful aliases - Short but descriptive Git shortcuts
- Enable rebase by default - Cleaner Git history
- Sign commits - For open source contributions
- Use SSH keys - More secure than HTTPS
- Consistent themes - Matching color schemes across tools
- Team standards - Shared configurations for team consistency
- Regular updates - Keep configurations current with new features
Team Configuration Sharing
# Export team Git configuration
git config --list > team-git-config.txt
# Share SSH host configurations
# Include in team documentation:
# Host work-server
# HostName work.example.com
# User developer
# Port 2222Related Documentation
- Environment Configuration - Programming languages and fonts
- Desktop Configuration - Desktop environment settings
- Configuration Validation - Validating configurations
- CLI Reference: System - System management commands
System configuration provides the foundation for a consistent development environment. Proper Git, SSH, and terminal settings ensure smooth workflows and team collaboration.