- Root of this repository is the root of my home directory.
- This is done using a bare git repository, which sets the working directory to the home folder, and git directory to
~/.dotfiles. - Using
showUntrackedFiles=false, only tracked files will be visible in git commands for the dotfiles.
- This is done using a bare git repository, which sets the working directory to the home folder, and git directory to
- Ansible playbooks are placed under
~/ansible-config.- This is used for configuring my MacOS system, packages and git repo.
After installing a fresh instance of MacOS, I temporary clone this repository and run my ansible-playbooks:
git clone --depth 1 https://github.com/frealmyr/dotfiles.git /tmp/dotfiles
cd /tmp/dotfiles/ansible-config
./provisionI make use of a alias for managing my dotfiles, dtf:
alias dtf='/usr/bin/git --git-dir=$HOME/.dtf/ --work-tree=$HOME'Only checked in files are tracked.
For adding all changes made to tracked files I use:
dtf add -u
dtf commit -m "changes"
dtf push -u origin mainAnd dtf add ./config/newapp if the files are not tracked yet.
Whenever I configure MacOS, I add more functionality to the playbooks in playbooks/ and then re-run the individual playbook. Keeping the playbooks updated.
Tip for adding
osx_defaultstasks in playbook, is to dump your existing configuration using thedefaults read -gcommand.
