my configs, settings, installation scripts, etc
Run script and use a var file (without file extension) from ./vars/
curl -fsSL https://raw.githubusercontent.com/Clumsy-Coder/dotfiles/master/bin/dotfiles.sh | bash -s -- <var filename without file extension>example:
curl -fsSL https://raw.githubusercontent.com/Clumsy-Coder/dotfiles/master/bin/dotfiles.sh | bash -s -- fedoraTo run a specfic role from ./roles/ directory
curl -fsSL https://raw.githubusercontent.com/Clumsy-Coder/dotfiles/master/bin/dotfiles.sh | bash -s -- <var filename> --tags <role name>example:
curl -fsSL https://raw.githubusercontent.com/Clumsy-Coder/dotfiles/master/bin/dotfiles.sh | bash -s -- fedora --tags code-directoryexample multiple roles:
curl -fsSL https://raw.githubusercontent.com/Clumsy-Coder/dotfiles/master/bin/dotfiles.sh | bash -s -- fedora --tags 'code-directory, dnf'This repo will be using Ansible to set up dotfiles, install apps, etc
command dotfiles is used for running Ansible playbook
When running dotfiles, it expects a var file from ./vars/ directory (without the file extension).
The var file must contain a var named default_roles. This var will be used to run roles stored in the ./roles
Ex: if a var file foo.yaml contains role code-directory and git in var default_roles; when running dotfiles foo, it will run roles code-directory and git
dotfiles bootstrapping is supported in the following OS
- Ubuntu
- Pop!_OS
- Fedora
dotfiles <var file>Ex:
dotfiles fedoraIf you want to run a specific role, you need to provide the ansible argument --tags <role name>
dotfiles <var file> --tags <role name>Ex:
dotfiles fedora --tags code-directoryTo run multiple specific roles, separate the roles with a comma
dotfiles <var file> --tags 'role1, role2, role3'Ex:
dotfiles fedora --tags 'code-directory, git, dnf'This repo uses ansible and ansible-playbook to setup the OS
All dotfiles are stored in ./tools/ directory
The ./bin/dotfiles.sh will
- Check if the dotfiles repo is cloned on to the path defined in env
DOTFILES_DIR - add a symbolic line of
./bin/dotfiles.shto$HOME/.local/bin/dotfiles- run the command
dotfilesfrom any directory
- run the command
- load file
./bin/colours.sh - load file
./bin/functions.sh - load file
./tools/zsh/.zshenv - load file
./tools/zsh/exports.zsh - install ansible on the supported OS
- update git submodules
- install packages from
./requirements.yamlusing ansible galaxy - check if a var file if not provided
- display help page
- exit program
- check if var file doesn't exist
- display help page and available var file names
- exit program
- run ansible playbook using the var file provided
Ansible roles are used for specific task, Ex: Installing NVM, configuring Alacritty. Some roles
are OS specific.
A single ansible playbook is used. It loads a var file (provided by when executing ./bin/dotfiles.sh)
which contains var default_roles that will run the listed roles
Ansible vars are used to store any variables that be used in an Ansible role. Ex: list of apps to install on homebrew
The directory vars/ contains ansible var files used by ansible-playbook. Each file is corresponding
to an OS.
Note
Each var file in ./vars/ directory must contain a var default_roles. It's a list of roles to run if not specified by the user
Ex:
default_roles:
- code-directory
- apt
- git
- lazygit
- neofetch
- neovim
- astronvim-v4
- tmux
- nvmdotfiles/ ├── .github/ ├── bin/ # shell scripts to run dotfiles and ansible-playbook ├── docs/ # documentation assets. Ex: screenshots ├── meta/ # dotbot configs and profiles. No longer in use ├── pre_tasks/ # Task to run before anything else in ansible-playbook ├── roles/ # Ansible roles ├── tasks/ # Ansible tasks ├── tools/ # dotfile configs ├── vars/ # Ansible vars ├── .ansible-lint ├── .editorconfig ├── .gitignore ├── .gitmodules ├── .luacheckrc ├── .markdownlint.json ├── .stylua.toml ├── .yamllint ├── ansible.cfg # Ansible configs ├── dotbot-readme.md # Old docs for dotbot ├── hosts # Ansible hosts ├── install-profile # used by dotbot. No longer in use ├── install-standalone # used by dotbot. No longer in use ├── LICENSE ├── main.yaml # Main ansible playbook file ├── README.md └── requirements.yaml # Ansible Galaxy. needed before running Ansible