G
YouTube TikTok Games
Skip to content
erikenzPublic

About

Declarative CachyOS (Hyprland) and Termux dotfiles managed with chezmoi

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

194 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏠 Erik's Dotfiles

Automated, secure, and cross-platform dotfiles managed with chezmoi.

Supported Environments:

  • 🐧 CachyOS / Arch Linux (Wayland / Hyprland / Full Desktop & CLI)
  • πŸ“± Termux (Android) (Fish / Neovim / CLI Development)

πŸš€ One-Line Automated Setup

On CachyOS / Arch Linux

sudo pacman -S --needed git chezmoi && chezmoi init --apply https://github.com/erikenz/dotfiles.git

On Termux (Android)

pkg update && pkg install -y git chezmoi && chezmoi init --apply https://github.com/erikenz/dotfiles.git

πŸ—οΈ Architecture & Best Practices

This repository follows official chezmoi best practices:

~/.local/share/chezmoi/
β”œβ”€β”€ .chezmoiroot            # Sets target root to home/
β”œβ”€β”€ .chezmoidata/           # Static data manifests
β”‚   └── packages.yaml       # Declarative package lists for CachyOS and Termux
β”œβ”€β”€ .chezmoiscripts/        # Lifecycle scripts
β”‚   β”œβ”€β”€ run_onchange_before_10-install-packages-cachyos.sh.tmpl
β”‚   β”œβ”€β”€ run_onchange_before_10-install-packages-termux.sh.tmpl
β”‚   β”œβ”€β”€ run_onchange_after_20-mise-install.sh.tmpl
β”‚   β”œβ”€β”€ run_onchange_after_30-fisher-install.sh.tmpl
β”‚   β”œβ”€β”€ run_once_before_configure-git-hooks.sh.tmpl
β”‚   └── run_once_before_configure-mchose-udev.sh.tmpl
β”œβ”€β”€ home/                   # Source state for target files (~/)
β”‚   β”œβ”€β”€ .chezmoi.toml.tmpl  # Dynamic platform detection & config
β”‚   β”œβ”€β”€ .chezmoiignore      # Ignores logs, caches, and filters desktop configs on Termux
β”‚   β”œβ”€β”€ dot_config/         # Managed configurations (~/.config)
β”‚   └── dot_local/bin/      # Local executable helper scripts (~/.local/bin)
└── bootstrap.sh            # Universal bootstrap script

1. Tiered Declarative Package Management

The repository manages software across three clean tiers:

  1. System Packages (.chezmoidata/packages.yaml):

    • common: Shared CLI tools (fish, starship, neovim, ripgrep, fd, bat, eza, zoxide, fzf, jq, bottom, lazygit, tmux, curl, wget).
    • cachyos: Full desktop & CLI stack (ghostty, zed, hyprland, hyprpicker, hyprpolkitagent, xdg-desktop-portal-hyprland, uwsm, wofi, zathura, zathura-pdf-mupdf, cliphist, grim, slurp, pavucontrol, playerctl, brightnessctl, translate-shell, cachyos-fish-config, fisher, fastfetch, mise, lazydocker, shelly, swash, rbw, AUR: input-remapper-git).
    • termux: Android CLI stack (termux-api, termux-exec, termux-tools, openssh, proot, python, nodejs, gh).
  2. Toolchain & Agent Runtimes (~/.config/mise/config.toml):

    • Automated post-apply script (run_onchange_after_20-mise-install.sh.tmpl) runs mise install -y to provision:
      • herdr (terminal multiplexer for coding agents)
      • agy (Google Antigravity CLI)
      • bun, node, pnpm (runtimes & package managers)
      • mcp-hub (MCP server aggregator)
      • @dokploy/cli, cc-safety-net
  3. Fish Shell Plugins (~/.config/fish/fish_plugins):

    • Automated post-apply script (run_onchange_after_30-fisher-install.sh.tmpl) updates Fisher plugins:
      • fzf.fish, gitnow, fish-abbreviation-tips, puffer-fish, zoxide.fish.

2. Platform Filtering via .chezmoiignore

On Termux, GUI and desktop components (Hyprland, Wayland, Ghostty, Zed, GTK/QT, Udev rules) are automatically ignored and never copied to Android storage.

3. Portable Scripts & Shebangs

All scripts use #!/usr/bin/env bash and respect Termux's $PREFIX pathing and non-root execution model.


πŸ”’ Security & Secret Management

No sensitive tokens, credentials, or private keys are ever published in this public repository.

Strategy:

  1. API Keys & Passwords:
    • Retrieved at runtime using rbw (Bitwarden CLI) via get-secret or chezmoi template functions:
      {{ (rbw "openai").password }}
      
    • Falls back to local environment variables (e.g. OPENCODE_API_KEY).
  2. Encrypted Files (SSH Keys, Certificates):
    • Encrypted with age before committing:
      chezmoi add --encrypt ~/.ssh/id_ed25519
  3. Pre-Commit Secret Scanner:
    • A Git pre-commit hook automatically scans staged changes for API keys, personal access tokens, and private key headers.

πŸ› οΈ Daily Chezmoi Workflow

Task Command
Edit configuration chezmoi edit ~/.config/fish/config.fish
Inspect pending changes chezmoi diff
Apply changes to home chezmoi apply -v
Add new file to management chezmoi add ~/.config/app/config.json
Update from GitHub on another machine chezmoi update -v
Open shell in chezmoi source chezmoi cd
Verify setup health chezmoi doctor

πŸ“š References

About

Declarative CachyOS (Hyprland) and Termux dotfiles managed with chezmoi

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages