Application configuration deployment for Starship, Helix, Yazi and other tools.
The Configs role deploys configuration files (dotfiles) for the various CLI tools installed by the cli_tools role. It provides a consistent, customized user experience with optimized settings for development workflows.
- Ubuntu 20.04 LTS or later
- Ansible 2.12 or later
- Common role (automatically included as dependency)
- CLI Tools role (automatically included as dependency)
The following variables can be set in defaults/main.yml:
# Configuration templates to deploy
config_templates:
- src: starship.toml.j2
dest: "{{ ansible_user_dir }}/.config/starship.toml"
mode: '0644'
- src: helix.toml.j2
dest: "{{ ansible_user_dir }}/.config/helix/config.toml"
mode: '0644'
- src: yazi.toml.j2
dest: "{{ ansible_user_dir }}/.config/yazi/yazi.toml"
mode: '0644'
- src: yazi_keymap.toml.j2
dest: "{{ ansible_user_dir }}/.config/yazi/keymap.toml"
mode: '0644'
# User configuration
target_user: "{{ ansible_user }}"
# Starship configuration
starship_config:
format: "$all$character"
add_newline: true
# Helix configuration
helix_config:
theme: "default"
editor:
line_number: "relative"
mouse: false
# Yazi configuration
yazi_config:
manager:
show_hidden: false
sort_by: "natural"config_templates: List of configuration templates to deploytarget_user: User for which configurations are being deployedstarship_config: Starship prompt configuration optionshelix_config: Helix editor configuration optionsyazi_config: Yazi file manager configuration options
common: Base system setup and essential packagescli_tools: CLI tools that need to be configured
---
- hosts: servers
become: yes
roles:
- common
- rust
- cli_tools
- configsConfigures the Starship cross-shell prompt with:
- Git status and branch information
- Language version indicators (Python, Node.js, Rust, etc.)
- Directory navigation shortcuts
- Custom prompt symbols and colors
- Performance optimizations
Configures the Helix text editor with:
- Relative line numbers
- Modern key bindings
- LSP integration settings
- Search and navigation options
- Theme and appearance settings
Configures the Yazi terminal file manager with:
- File sorting and display options
- Custom key bindings
- Preview settings
- Navigation shortcuts
- Integration with other tools
- Template System: Uses Jinja2 templates for flexible configuration
- User-specific: Deploys configurations in user's home directory
- Modular: Each tool has separate configuration files
- Customizable: Easy to override default configurations
- Consistent: Provides unified appearance and behavior across tools
You can customize configurations by overriding template variables:
# Custom Starship configuration
starship_config:
format: "$username$hostname$directory$git_branch$character"
add_newline: false
character:
success_symbol: "[➜](bold green)"
error_symbol: "[➜](bold red)"
# Custom Helix configuration
helix_config:
theme: "dark_plus"
editor:
line_number: "absolute"
mouse: true
cursor_shape:
insert: "bar"
normal: "block"To modify configurations further, edit the template files:
templates/starship.toml.j2: Starship prompt configurationtemplates/helix.toml.j2: Helix editor settingstemplates/yazi.toml.j2: Yazi file manager configurationtemplates/yazi_keymap.toml.j2: Yazi key bindings
Configurations are deployed to standard XDG config directories:
~/.config/
├── starship.toml
├── helix/
│ └── config.toml
└── yazi/
├── yazi.toml
└── keymap.toml
These configurations integrate with:
- Fish shell (via fish role configuration)
- Modern CLI tools (bat, eza, fd, etc.)
- Development workflows
- Terminal multiplexers
The role ensures:
- Configuration directories are created
- Templates are properly rendered
- File permissions are correct
- Configurations are valid
MIT
Development Team - Internal Use