by shunk031
๐ป My dotfiles powered by chezmoi; Primarily built with Rust-based applications (sheldon/startship/mise etc.)
# Add to your Claude Code skills
git clone https://github.com/shunk031/dotfilesNo comments yet. Be the first to share your thoughts!
This dotfiles repository is managed with chezmoi๐ , a great dotfiles manager.
The setup scripts are aimed for MacOS, Ubuntu Desktop, and Ubuntu Server. The first two (MacOS/Ubuntu Desktop) include settings for client machines and the latter one (Ubuntu Server) for server machines.
The actual dotfiles exist under the home directory specified in the .chezmoiroot.
See .chezmoiroot - chezmoi more detail on the setting.
To set up the dotfiles run the appropriate snippet in the terminal.
bash -c "$(curl -fsLS http://shunk031.me/dotfiles/setup.sh)"

bash -c "$(wget -qO - http://shunk031.me/dotfiles/setup.sh)"

The following is a minimal setup command to install chezmoi and my dotfiles from the github repository on a new empty machine:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init shunk031 --apply
This repository provides for the installation and setup of each application individually. The desired application can be installed as follows (e.g., docker installation on MacOS):
bash install/macos/common/docker.sh
Each installation script can be found under the ./install directory.
Updating and testing the dotfiles follows chezmoi's daily operations. To verify that the updated scripts work correctly, run the scripts on the actual local machine and on the docker container.
The setup scripts are stored as shellscripts in an appropriate location under the ./install directory.
After verifying that the shellscript works, store the chezmoi template-based file, which is based on the shellscript, in an appropriate location under the ./home/.chezmoiscripts directory.
Below is the correspondence between shellscript and template for docker installation on MacOS.
install/macos/common/docker.shhome/.chezmoiscripts/macos/run_once_10-install-docker.sh.tmplCurrently, chezmoi does not automatically reflect updated configuration files (ref. twpayne/chezmoi#2738).
The following command will execute the chezmoi apply command as soon as the file is modified using watchexec.
make watch
The chezmoi documentation mentions automatica application by watchman.
See https://www.chezmoi.io/user-guide/advanced/use-chezmoi-with-watchman/ for more detail.
Test the executation of the setup scripts on Ubuntu in its initial state. The following command will launch the test environment using Docker ๐ณ.
make docker
# docker run -it -v "$(pwd):/home/$(whoami)/.local/share/chezmoi" dotfiles /bin/bash --login
# shunk031@5f93d270cb51:~$
Run the chezmoi init --apply command to verify that the system is set up correctly.
shunk031@5f93d270cb51:~$ chezmoi init --apply
Test the shellscript for setup with Bash Automated Testing System (bats).
The scripts for the unit test can be found under ./tests directory.
The code coverage of the ./install scripts are continuously monitored at app.codecov.io/gh/shunk031/dotfiles. The following Icicle graph represents the code coverage of the scripts:
The startup speed of zsh on MacOS with this dotfile is continuously measured at shunk031.me/my-dotfiles-benchmarks using benchmark-action/github-action-benchmark.
.tmux.conf.d/system/server.conf and deploy as ~/.tmux.confwget -O ~/.tmux.conf https://raw.githubusercontent.com/shunk031/dotfiles/master/home/dot_tmux.conf.d/system/server.conf
.vimrc and deploy to ~/.vimrcwget -O ~/.vimrc https://raw.githubusercontent.com/shunk031/dotfiles/master/home/dot_vimrc
Inspiration and code was taken from many sources, including:
The code is available under the MIT license.