Skip to content

matthiashamacher/dotfiles

Repository files navigation

dotfiles

This repo is heavily influenced by TechDufus's repo. Go check it out!

Requirements

Operating System

This Ansible playbook only supports MacOS (Darwin) distribution. This is by design to provide a consistent development experience across hosts.

vault.secret

The vault.secret file allows you to encrypt values with Ansible vault and store them securely in source control.

To then encrypt values with your vault password use the following:

$ ansible-vault encrypt_string --vault-password-file $HOME/.ansible-vault/vault.secret "mynewsecret" --name "MY_SECRET_VAR"
$ cat myfile.conf | ansible-vault encrypt_string --vault-password-file $HOME/.ansible-vault/vault.secret --stdin-name "myfile"

NOTE: This file will automatically be detected by the playbook when running dotfiles command to decrypt values. Read more on Ansible Vault here.

Usage

Install

This playbook includes a custom shell script located at bin/dotfiles. This script is added to your $PATH after installation and can be run multiple times while making sure any Ansible dependencies are installed and updated.

NOTE: You must follow required steps before running this command or things may become unusable until fixed.

bash -c "$(curl -fsSL https://raw.githubusercontent.com/matthiashamacher/dotfiles/main/bin/dotfiles)"

If you want to run only a specific role, you can specify the following bash command:

curl -fsSL https://raw.githubusercontent.com/matthiashamacher/dotfiles/main/bin/dotfiles | bash -s -- --tags comma,seperated,tags

Update

This repository is continuously updated with new features and settings which become available to you when updating.

To update your environment run the dotfiles command in your shell:

dotfiles

This will handle the following tasks:

  • Verify Ansible is up-to-date
  • Clone this repository locally to ~/.dotfiles
  • Verify any ansible-galaxy plugins are updated
  • Run this playbook with the values in ~/.config/dotfiles/group_vars/all.yaml

This dotfiles command is available to you after the first use of this repo, as it adds this repo's bin directory to your path, allowing you to call dotfiles from anywhere.

Any flags or arguments you pass to the dotfiles command are passed as-is to the ansible-playbook command.

For Example: Running the tmux tag with verbosity

dotfiles -t tmux -vvv