Goals of this repo:
git
.The Ansible script currently supports macOS using Homebrew and openSUSE (Tumbleweed).
Start by forking this repository to your own GitHub account.
Clone the repository using the following command (substituting your own values):
git clone git@github.com:{{ user_name }}/{{ repository }}.git
You will need to create a variables file that defines a few variables related to your machine.
We ignore this file by default because it will change from machine to machine, if you only have one machine you work on feel free to commit this file.
To create this file run:
touch vars/system.yml
Now paste (and update) the below snippets, we maintain both macOS and openSUSE examples:
macOS:
# Git
git_user: user@email.com
# System directories
local_bin: "{{ ansible_user_dir }}/.local/bin"
vendor_bin: /opt/homebrew/bin # // Use '/usr/local/bin' for older (non m1) devices
config_dir: "{{ ansible_user_dir }}/.config"
local_share: "{{ ansible_user_dir }}/.local/share"
# Tools & applications
asdf_home: "{{ ansible_user_dir}}/.asdf"
asdf_bin: "{{ asdf_home }}/bin"
wezterm_dir: "{{ config_dir }}/wezterm"
zsh_completions: "{{ ansible_user_dir }}/.zsh_completions"
openSUSE:
# Git
git_user: user@email.com
# System directories
local_bin: "{{ ansible_user_dir }}/.local/bin"
vendor_bin: /usr/bin
config_dir: "{{ ansible_user_dir }}/.config"
local_share: "{{ ansible_user_dir }}/.local/share"
# Tools & applications
asdf_home: "{{ ansible_user_dir}}/.asdf"
asdf_bin: "{{ asdf_home }}/bin"
# Use "/mnt/c/Users/{{ windows_user_name }}/.config/wezterm" when using WSL on Windows (substitute your windows username)
wezterm_dir: "{{ config_dir }}/wezterm"
zsh_completions: "{{ ansible_user_dir }}/.zsh_completions"
NOTE: Unlike vars/system.yml
the vars/config.yml
is intended to be tracked with git
on the grounds that these options should be synchronized between all machines.
Install ansible
with the following command:
sudo zypper install ansible
Install ansible
with the following command:
brew install ansible
Run the entire playbook with the following command in the project directory:
ansible-playbook main.yml --ask-become-pass
In the event that you to perform a partial installation you can mask use of Ansible tags. An example of what this might look like:
ansible-playbook main.yml --tags "asdf,node,deno" --ask-become-pass
Please refer to main.yml
to get an understanding of which tags are available.
The Ansible scripts have been designed to be deterministic meaning you can run them an infinite number of times and they should always work.
Synchronising latest changes can always be done using the following command:
ansible-playbook main.yml --ask-become-pass
Alternatively if you just have config changes a faster option is:
ansible-playbook main.yml --tags "rsync,config" --ask-become-pass
Or use config-{{ name }}
to update only one config:
ansible-playbook main.yml --tags "rsync,config-helix" --ask-become-pass
NOTE: rsync
installs a required package for Ansible synchronize, if it is already installed you can omit this tag.
If running the Ansible scripts the following software will be installed:
gopls
typescript-language-server
solargraph
rust-analyzer
via rustup
clojure-lsp
.Finally we utilize asdf for languages that do not have an official way to manage versions.
Below are some brief reasonings behind each software I have chosen to use.
In terms of managing dotfiles I have written about the topic extensively in my knowledgebase.
Any tool that requires significant configuration has been documented seperately, below are links to each document:
There are a large number of command line utilities being developed by the open source community. Below is a list of all of the utilities included in this repo.
Development:
Navigation:
Shell:
Misc:
Theming is hugely personal but below are some notes to get you started.
Below are a number of fonts I have used (or wanted to use) over the years, I have split them into premium meaning there is a cost associated with them and free meaning they can be used for personal use (or in some cases commercial use) at no cost.
Premium:
I use Berkeley Mono Typeface exclusively these days and absolutely love it. Yes I paid the $75.00 and it was worth every penny.
Free:
If you are like me and you want all your application to use the same color scheme there are a couple of limitations you need to be aware of.
Essentially there are 5 applications you need to theme fzf
, bat
, nap
, Helix, and WezTerm. These all have their own theme engines so you are effectively limited to themes supported by all 6 applications.
Here are some tips for finding themes for each application:
bat --list-themes
to view installed themes. Fourtunately bat
use .tmTheme
themes meaning any Sublime Text theme will work with bat
, the Ansible script will install a few extra bat
themes for you.fzf
snippets in their docs if your lucky, I have however had a lot of success with base16-fzf which includes a lot of modern themes.styles/
directory to check available themes.Below are a list of future improvements I would like to make to this repository.
vadimcn/vscode-lldb
to work with Rust LSP. Pending this issue.teaxyz/cli
once it is a bit more mature.zyedidia/eget
for GitHub downloads.valentjn/ltex-ls
for grammer checks. More information.Below are some common gotchas and how to fix them.
It is possible to hit the upper limit of GitHub API interactions if the Ansible playbook is being run repeatedly.
You can get around this by running the following command substituting in your own token:
ansible-playbook main.yml --ask-become-pass --extra-vars="github_token={{ token_value }}"
When installing global packages (i.e with npm
) these packages will not be reshimmed automatically.
To reshim all packages run:
asdf reshim
Below are some of the experiments that I have tried over the years either didn't make it into my dotfiles or were removed.
I tried to love Emacs while becomming aquainted with Clojure but try as I might I couldn't make it stick.
I have written about my experience with editors ad nauseam in my knowledgebase.
I really wanted a terminal based workflow for quickly looking up language documentation when needed.
I tried both cht.sh
and dasht
but neither really stuck in the way I wanted.
For now I have setup a custom search engine for devdocs.io which is still relatively fast and has the advantage of correctly rendering the MDN examples.
If you want to do this yourself the URL you will need is below, note %s
refers to the search term placeholder.
https://devdocs.io/#q=%s
In the future I would like to explore doing something like this for a more terminal centric workflow.
I originally tried to create my own markdown knowledge base rendered in the terminal via Glow.
Unfortunately this didn't quite have the flow I wanted.
I had varying success with Silver Bullet but it encourages editing via the browser and I would much prefer to stay in my editor.
Now I am using Helix with Marksman and this is working well.
If you are interested in building your own knowledge base here is mine.
The below resources were quintessential in creating this repository.