My dotfiles...
The previous implementation failed to prevent duplicates if the entry being added was the only entry already present in the path. The reason is that it always required a : to be present in order to remove the new entry before adding it. The new implementation is clearer and solves that. However, if the new entry is already present it will be kept where it was, not moved to the front of the list. This is fine at the moment. |
||
---|---|---|
roles | ||
.gitattributes | ||
.gitignore | ||
.key | ||
dotfiles.yml | ||
hosts.ini | ||
README.md |
Prerequisites
- ansible: for installing the dofiles.
- git-crypt: for handling sensitive data in the repo (installed via ansible cookbook).
- gpg: for decrypting the key used by
git-crypt
(installed via ansible cookbook).
Installation
Steps:
- Install ansible.
- Create an SSH key with (e.g. with
ssh-keygen -t ed25519 -C "$(whoami)@$(hostname)"
) and register it. - Add a preliminary
~/.ssh/config
to reachgit.schauenburg.me
at the correct port. - Clone the repo.
- Play the
dotfiles.yml
ansible playbook. - Decrypt key & initialize git-crypt to access sensitive data.
Cookbook:
sudo apt-get install ansible
echo -e "Host git.schauenburg.me\nUser git\nPort 587" >>~/.ssh/config
git clone git@git.schauenburg.me:fernando/dotfiles.git $HOME/.dotfiles
cd $HOME/.dotfiles
ansible-playbook -i hosts.ini dotfiles.yml
gpg -d --output - <(base64 -d .key) | git crypt unlock -