My personal dotfiles, managed by chezmoi.
This is a configuration-driven set of dotfiles that allows me to version control my development
environment and keep it consistent across multiple machines. It uses chezmoi to manage
configurations for different operating systems (macOS and Linux) and environments.
This repository can be installed via HTTPS or SSH. In order to install via SSH, you must set up SSH authentication with GitHub.
You can install chezmoi and initialize your dotfiles from this repository with a single command.
This will also apply the changes to your home directory.
If you prefer to review the changes before applying them, you can omit the --apply flag and then
run chezmoi diff to see a preview and chezmoi apply -v to execute the changes.
sh -c "$(curl -fsLS get.chezmoi.io/lb)" -- init --apply git@github.com:michaelheyman/dotfiles.gitsh -c "$(curl -fsLS get.chezmoi.io/lb)" -- init --apply https://github.com/michaelheyman/dotfiles.gitTwo DSM-specific issues require workarounds:
- The standard install script fails with
unable to determine libc— use the statically-linked musl build instead, which has no libc dependency. - DSM mounts
/tmpwithnoexec, so chezmoi can't execute its temporary scripts there — setTMPDIRto a directory under your home folder.
mkdir -p ~/.local/bin ~/.local/tmp
curl -sL "https://github.com/twpayne/chezmoi/releases/download/v2.69.4/chezmoi-linux-amd64-musl" \
-o ~/.local/bin/chezmoi
chmod +x ~/.local/bin/chezmoi
TMPDIR=~/.local/tmp ~/.local/bin/chezmoi init --apply https://github.com/michaelheyman/dotfiles.gitTo make changes to your dotfiles, you can edit the source files directly and then apply them.
-
Edit a file: Use
chezmoi editto open a file in your editor.chezmoi edit ~/.bashrc -
Apply changes: Run
chezmoi applyto apply any pending changes.chezmoi apply -v
-
Commit and push changes: The source directory (
~/.local/share/chezmoi) is a git repository. Commit and push your changes as you would with any other repository.chezmoi cd git add . git commit -m "Add new feature" git push
task installinstalls the pinned tools (via mise) and a pre-commit hook that checks every commit. To run the same checks on every file:task lint
A Dockerfile is included in the .docker/ directory to provide a clean environment for testing
your dotfiles on Linux.
-
Build the Docker image: From the root of the repository, run:
task docker:build
-
Run the container: The
Dockerfileis configured to automatically runchezmoi apply. You can run the container interactively to see the results:task docker:run