Skip to content

kibaamor/dotfiles

Repository files navigation

dotfiles

Build and Push DevContainers

Personal dotfiles managed with chezmoi.

Install

Find the fastest mirror (optional, useful for users in China)

Before installing, run this script to pick the fastest GitHub mirror for your network. The script tests multiple mirror candidates in parallel and exports the result as a DOTFILES_MIRROR variable — add it to your environment before running the install commands below.

bash <(curl -fsSL https://raw.githubusercontent.com/kibaamor/dotfiles/main/find-gh-mirror.sh)
# or
bash <(curl -fsSL https://cdn.gh-proxy.org/https://raw.githubusercontent.com/kibaamor/dotfiles/main/find-gh-mirror.sh)
# or
bash <(curl -fsSL https://ghproxy.net/https://raw.githubusercontent.com/kibaamor/dotfiles/main/find-gh-mirror.sh)

See find-gh-mirror.sh --help for additional options (custom probes, timeouts, extra mirrors, etc.).

Linux

# Set the default Git user name and email.
export GIT_USERNAME=x
export GIT_USEREMAIL=x@x.x
# (Optional) Install extra binaries (takes effect at every chezmoi update).
export DOTFILES_EXTRA_BINS=1
# (Optional) Install binaries through arkade (takes effect at every chezmoi update).
export DOTFILES_ARKADE_BINS=1
# (Optional) Set a mirror for GitHub-hosted downloads.
export DOTFILES_MIRROR=https://cdn.gh-proxy.org
# (Optional) Set a proxy; replace this URL with your proxy address.
export HTTP_PROXY=http://localhost:7890
export HTTPS_PROXY=http://localhost:7890
export default_proxy=http://localhost:7890
# (Optional) Set the GitHub proxy.
git config --global url."https://cdn.gh-proxy.org/https://github.com/".insteadOf "https://github.com/"
git config --file ~/.gitconfig-proxy url."https://cdn.gh-proxy.org/https://github.com/".insteadOf "https://github.com/"

# Install dotfiles
sh -c "$(curl -fsLS https://get.chezmoi.io/lb)" -- init --apply kibaamor

You can set git config for GitHub via command git config --file ~/.gitconfig-github user.name xxx.

You can set git config for GitLab via command git config --file ~/.gitconfig-gitlab user.name xxx.

Windows

# Install WinGet on Windows Sandbox
# https://learn.microsoft.com/en-us/windows/package-manager/winget/#install-winget-on-windows-sandbox

# Install chezmoi via WinGet
winget install --id twpayne.chezmoi --accept-source-agreements

# Set the default Git user name and email.
$env:GIT_USERNAME = "x"
$env:GIT_USEREMAIL = "x@x.x"
# (Optional) Install extra binaries (takes effect at every chezmoi update).
$env:DOTFILES_EXTRA_BINS = "1"
# (Optional) Install binaries through arkade (takes effect at every chezmoi update).
$env:DOTFILES_ARKADE_BINS = "1"
# (Optional) Set a mirror for GitHub-hosted downloads.
$env:DOTFILES_MIRROR = "https://cdn.gh-proxy.org"
# (Optional) Set a proxy; replace this URL with your proxy address.
$env:HTTP_PROXY = "http://localhost:7890"
$env:HTTPS_PROXY = "http://localhost:7890"
$env:default_proxy = "http://localhost:7890"
# (Optional) Set the GitHub proxy.
git config --global url."https://cdn.gh-proxy.org/https://github.com/".insteadOf "https://github.com/"
git config --file ~/.gitconfig-proxy url."https://cdn.gh-proxy.org/https://github.com/".insteadOf "https://github.com/"

# Set the execution policy to RemoteSigned for the current user, so that the dotfiles setup scripts can be executed.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force

# Install dotfiles
chezmoi init --apply kibaamor

You can set git config for GitHub via command git config --file $env:USERPROFILE/.gitconfig-github user.name xxx.

You can set git config for GitLab via command git config --file $env:USERPROFILE/.gitconfig-gitlab user.name xxx.

Usage

Prefer CDN mirror for downloads

Set DOTFILES_MIRROR to a mirror base URL to route all GitHub-hosted downloads through a proxy/CDN instead of fetching directly from GitHub. When set, the mirror becomes the primary URL and the original GitHub URL is preserved as a fallback. Takes effect at every chezmoi update, not just chezmoi init.

DOTFILES_MIRROR=https://cdn.gh-proxy.org chezmoi update

Toggle extra binaries at update time

DOTFILES_EXTRA_BINS and DOTFILES_ARKADE_BINS are re-read at every chezmoi update — no need to re-initialize. Enable or disable them before running update:

# Enable extra binaries on next update
DOTFILES_EXTRA_BINS=1 DOTFILES_ARKADE_BINS=1 chezmoi update

# Disable extra binaries on next update (remove from ~/.local/bin on next apply)
chezmoi update

Installed Binaries

Default Installed Binaries

  1. delta — Linux / Windows
  2. bat — Linux / macOS / Windows
  3. fd — Linux / Windows
  4. fzf — Linux / macOS / Windows
  5. direnv — Linux / macOS / Windows
  6. rg — Linux / macOS / Windows
  7. lsd — Linux / macOS / Windows
  8. duf — Linux / macOS / Windows
  9. age, age-keygen — Linux / macOS / Windows
  10. tldr — Linux / macOS / Windows
  11. jq — Linux / macOS / Windows
  12. yq — Linux / macOS / Windows
  13. gdu — Linux / macOS / Windows
  14. ipgeo — Linux / macOS / Windows
  15. ipstream — Linux / macOS / Windows
  16. tproxy — Linux / macOS / Windows
  17. gping — Linux / macOS / Windows
  18. doggo — Linux / macOS / Windows
  19. nexttrace — Linux / macOS / Windows
  20. ctop — Linux / Windows
  21. kubecolor — Linux / macOS / Windows
  22. arkade — Linux / macOS / Windows
  23. upx — Linux only
  24. ShellCheck — Linux / macOS / Windows

Extra Binaries

These binaries are installed only when DOTFILES_EXTRA_BINS is non-empty.

  1. kubeshark — Linux / macOS / Windows
  2. kubefwd — Linux / macOS / Windows

Binaries Installed via Arkade

These binaries are installed through arkade only when DOTFILES_ARKADE_BINS is non-empty.

  1. mkcert — Linux / macOS / Windows
  2. dive — Linux / macOS / Windows
  3. lazydocker — Linux / macOS / Windows
  4. minikube — Linux / macOS / Windows
  5. kind — Linux / macOS / Windows
  6. kubectx, kubens — Linux / macOS / Windows
  7. k9s — Linux / macOS / Windows
  8. helm — Linux / macOS / Windows

Troubleshooting

chezmoi: fork/exec /tmp/XXXXXXXXXX.XX: permission denied

# (Optional) Set `TMPDIR` if `/tmp` is mounted with `noexec`.
export TMPDIR=~/.tmp

About

Personal dotfiles.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors