Skip to content

Conversation

@noneel
Copy link

@noneel noneel commented Jan 28, 2026

Summary

  • Add overrides/ directory structure for fork maintainers to customize roles without modifying upstream files
  • Include documentation and example config for the three override levels
  • Leverages existing infrastructure in ansible.cfg, main.yml, and 23 roles

Problem

Maintaining a fork with personal customizations (neovim config, bash aliases, etc.) makes pulling upstream changes painful due to merge conflicts.

Solution

The override infrastructure already exists but the directory was missing. This PR adds:

overrides/
├── README.md # Usage documentation
├── group_vars/
│ ├── .gitkeep
│ └── user.yml.example # Example variable overrides
├── roles/.gitkeep # Per-role file/var overrides
└── custom_roles/.gitkeep # Complete role replacements

Three override levels:

Level Location Use Case
Variables group_vars/user.yml Change values without touching roles
Files/Vars roles/{role}/files/ Replace config files, keep role logic
Full Role custom_roles/{role}/ Complete role replacement

Test plan

  • Run dotfiles --check to verify no syntax errors
  • Create overrides/group_vars/user.yml with a test variable
  • Verify variable override loads correctly
  • Test a file override in overrides/roles/bash/files/

noneel and others added 30 commits May 13, 2025 12:18
Pull 251 commits from upstream while preserving local customizations.

Preserved:
- Neovim config (custom ai.lua, java.lua, debugging.lua plugins)
- Bitwarden integration (bin/dotfiles, git role, zsh vars.secret)
- Tmux config (keybindings, sessionx, vim-tmux-navigator)
- Starship prompt (kept over upstream's oh-my-bash switch)

Adopted from upstream:
- New roles: awesomewm, claude, opencode, bun, 1password, jj, sesh
- detect_sudo.yml pre-task for robust privilege handling
- Modern ansible_facts syntax throughout
- Zoxide shell integration in .zshrc
- Per-role documentation (CLAUDE.md, README.md)
- GitHub Actions: shellcheck, yaml-lint, markdown-lint workflows
- Robust zsh installer with sudo fallback

Bash role merged carefully: kept oh-my-posh cleanup handler,
skipped oh-my-bash installation to preserve starship setup.
Change methodology to use overrides/ directory to stay in sync
@noneel
Copy link
Author

noneel commented Jan 28, 2026

TechDufus added a commit that referenced this pull request Jan 28, 2026
Introduces a wrapper task that checks for three override levels before
running each role:
- vars: loads overrides/{role}/vars/main.yml to merge/override variables
- files: sets _files_path for file operations
- tasks: replaces role entirely with override tasks

Based on approach from PR #144 but centralized in a single wrapper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant