Configuration management system using MItamae for cross-platform dotfiles and system setup.
curl https://raw.githubusercontent.com/dsisnero/doms_dotfiles/main/install | bash -sSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb https://raw.githubusercontent.com/dsisnero/doms_dotfiles/main/install.ps1 | iexNote for Windows: If the install script appears cached, use:
iwr -Headers @{"Cache-Control"="no-cache"} -useb https://raw.githubusercontent.com/dsisnero/doms_dotfiles/main/install.ps1 | iex# Full deployment (all cookbooks)
./bin/deploy
# Deploy with debug logging
./bin/deploy --debug
# Deploy specific cookbook(s)
./bin/deploy git
./bin/deploy git dotfiles rust
# Deploy with role and hostname
./bin/deploy --role development --host pi-dev- Sets
DEBUG=true,ROLEandHOSTNAMEfrom--role/--hostflags - Exports
ROLEandHOSTNAMEas environment variables
- Downloads
mitamaebinary if missing (architecture-specific) - SSH URL detection: Checks
.gitmodulesand git config for SSH URLs → runsgit submodule syncif found - Initializes submodules with
git submodule update --init --recursive
- Loads
github_binaryplugin viaRUBYLIB - macOS: Runs mitamae directly
- Linux/Raspberry Pi: Uses
sudo -Ewith environment preservation
- Runs
mitamae local --shell /bin/bash -l debug lib/recipe.rb
include_recipe "recipe_helper" # Loads all helpers
if node[:platform] == "pop" # Pop!→Ubuntu remap
node.reverse_merge!(platform: "ubuntu")
end
include_role node[:platform] # e.g., "debian", "ubuntu", "darwin"
if node[:role] # e.g., "development", "media"
include_role node[:role]
end- Helper Definitions:
include_cookbook,include_role,include_definition - Platform Detection:
windows?,wsl?,version_less_than? - GitHub API helpers:
github_latest_version,compute_target_info
- Role Detection (
detect_rolelines 68‑89):ENV["ROLE"](set by--roleflag) takes precedence- Hostname-based fallback:
pi-dev*→developmentpi-media*→mediapi-minimal*→minimalpi-ha*→home-assistant
- Hostname Setting (
set_hostnamelines 91‑132):- Uses
ENV["HOSTNAME"](set by--hostflag) - Platform-specific commands (
hostnamectl,scutil)
- Uses
- Node Variables (lines 134‑186):
user,home,group, XDG directories- Paths:
repos,my_repos,doms_dotfiles - Sets
node[:role]from detection
- Removes
nano, installs Raspberry Pi packages on ARM - Updates packages (
apt update && apt upgrade) - Includes base role:
include_role("base")
- Installs core tools via
mise(node, lua‑language‑server, fd, rg, etc.) - Includes cookbooks:
keepassxc,sudo_nopassword,mise,keychain,dotfiles,git,rust,helix,golang,neovim,zsh,mysql,chrome,calibre,podman, etc.
roles/development/default.rb,roles/media/default.rb, etc.- Role-specific packages and configurations
- Platform detection logged at start (
lib/recipe.rb:2) - Node info dumped after initialization (
lib/recipe_helper.rb:375) - All mitamae operations run at
debuglog level
./bin/deploy gitbin/normalize_cookbooksconverts"git"→"cookbooks/git/default.rb"- Runs
mitamae local -l debug lib/recipe_helper.rb cookbooks/git/default.rb - Same initialization, but only the specified cookbook executed after helpers
- Debian-based: Debian, Ubuntu, Mint, Pop! (remapped to Ubuntu)
- RPM-based: RedHat, Fedora, Amazon Linux
- Other: Arch, OpenSUSE
- Raspberry Pi: ARM detection,
raspi-config, SPI/I2C enablement
- Darwin support via Homebrew packages
- Hostname management via
scutil
- Limited support via
windows_node.rb - PowerShell-based installation
When writing system configuration files:
- Linux: Use
owner "root"andgroup "root"for/etc/files - macOS: Use
owner "root"andgroup "wheel"for system files, but omit when running without root privileges - Windows: Use forward slashes in paths, no ownership specification needed
- Backup Strategy: Use incremental backups (
.backup,.backup.2, etc.) before modifying critical config files - Platform Detection: Use
node[:platform]and helpers likewindows?,wsl?
- development: Development tools and environments
- media: Media center packages (Plex, Jellyfin, etc.)
- minimal: Minimal system setup
- home-assistant: Home Assistant automation platform
--rolecommand-line flag- Hostname pattern matching:
pi-dev*→developmentpi-media*→mediapi-minimal*→minimalpi-ha*→home-assistant
cookbooks/
├── git/ # Git configuration
├── dotfiles/ # Dotfile management
├── rust/ # Rust toolchain
├── neovim/ # Neovim editor
└── ...
- Create
cookbooks/NAME/default.rb - Follow existing patterns for idempotency
- Use helper methods from
lib/recipe_helper.rb - Test with
./bin/deploy NAME
plugins/itamae-plugin-recipe-rust- Rust installationplugins/mitamae-plugin-resource-github_binary- GitHub binary downloadsplugins/mitamae-plugin-resource-apt-repository- APT repository managementplugins/mitamae-plugin-resource-apt_keyring- APT keyring managementplugins/itamae-plugin-resource-flatpak- Flatpak support
All plugin submodules now use HTTPS URLs for public cloning. The bin/setup
script automatically detects SSH URLs and runs git submodule sync to update
them.
# If SSH authentication fails on fresh Raspberry Pi:
git submodule sync
git submodule update --init --recursive
# Check for SSH URLs:
grep -E 'git@|ssh://' .gitmodules
git config --get-regexp '^submodule\..*\.url' | grep -E 'git@|ssh://'# Remove and re-download:
rm bin/mitamae
./bin/setup# Maximum verbosity:
./bin/deploy --debug 2>&1 | less
# Specific cookbook debug:
./bin/deploy --debug git| Variable | Purpose | Default |
|---|---|---|
ROLE |
Deployment role | Hostname-based detection |
HOSTNAME |
System hostname | Current hostname |
XDG_CONFIG_HOME |
Config directory | ~/.config |
XDG_DATA_HOME |
Data directory | ~/.local/share |
XDG_CACHE_HOME |
Cache directory | ~/.cache |
XDG_STATE_HOME |
State directory | ~/.local/state |
.
├── bin/ # Deployment scripts
├── cookbooks/ # MItamae cookbooks
├── roles/ # Platform and functional roles
├── plugins/ # MItamae plugins (submodules)
├── lib/ # Helper libraries
├── config/ # Configuration templates
├── definitions/ # MItamae definitions
└── templates/ # Template files
- AGENTS.md: AI coding assistant guide with project-specific commands and conventions
- TEST_DEPLOYMENT.md: Testing procedures and verification workflows
- PRE_COMMIT_FRAMEWORK.md: Pre-commit hook configuration and usage
- docs/: Design documents and planning notes
For detailed development workflows and coding standards, refer to AGENTS.md.