nyorc's dotfiles. Manage dotfiles on mac and debian.
[TOC]
- Git
- GNU Make
- GNU Stow
- Homebrew (macOS)
- apt (Debian)
Install homewbrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install git, make, stow
$ brew install git make stowReplace macOS default make with GNU make
PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
Install git, make, stow
$ sudo apt update && sudo apt install -y git make stowClone dotfiles repository
$ git clone git@github.com:nyorc/dotfiles.git ~/.dotfilesWhen using stow --dotfiles, Stow automatically converts file names:
- Files prefixed with
dot-become files prefixed with. - Example:
dot-gitconfig→~/.gitconfig - Example:
dot-zshrc→~/.zshrc
This avoids issues with hidden files in version control and makes dotfiles visible in the repository.
- homemaker: No longer maintained by the author. It was convenient to define dotfile deployment with TOML, but adding extra commands or variables made it more complex and harder to maintain.
- Ansible: Very powerful and can handle all tasks, but the maintenance cost is high. Simple shell commands become more complicated as you need to find the right module, and testing requires meeting both the module's requirements and the system environment.