I have maintained a consistent dot file since I think 2004ish perhaps a bit earlier. This repo represents a complete rewrite. (I have another repo for my older dot configs which earliest commit was 2007ish.. But I had been using it via diff+ssh, rcs, svn, and finally git. But I didn't port RCS into SVN so I had lost earlier history.) --- Anyway. Enjoy.
I have a lot of things here that was specific to a particular place and time which are probably no longer relevant, porting them to chezmoi was I guess for my own interest sake.
I recommend you copy and paste the good stuff out into your own chezmoi config rather than just mine there is a lot of config here which is specific to me or specific to a particular situation I had been in in the past.
Using chezmoi https://www.chezmoi.io/
If chezmoi prints warning: config file template has changed, rerun chezmoi init --apply arran4 to regenerate the configuration
from .chezmoi.toml.tmpl.
I don't think it's a good idea just to apply my dot files on to your system as there are a lot of configuration options and scripts I have put in intentionally, these could go unnoticed or taken for granted (which will make switching to other systems harder.) Saying that please pick out what you like / want. I am also happy to take suggestions in the form of PR or issues.
Using these dotfiles provides a quick way to bootstrap a consistent development environment across multiple platforms. Everything is driven by chezmoi so you can apply or customize the configuration with a single command.
Highlights include:
- Zsh and Bash setups with a shared prompt and a library of useful aliases (see
.chezmoitemplates). .gitconfig.tmplthat wires in the best available editor, color output and credential helpers.- Minimal tmux config with mouse mode and zsh as the default shell.
- Quickshell configuration derived from caelestia-dots/shell with Nix-only pieces stripped.
- Example
.vimrcand support files for Vim or Neovim. - OS-aware templates (
.chezmoi.toml.tmpl) that select paths and tools based on your platform. - Scripts for one-time tasks located in
.chezmoiscripts/that run automatically on the first apply. - Conditional
.chezmoiignorerules skip local executables likegh-release.shwhen dependencies such as the GitHub CLI (gh) are absent.
Feel free to copy individual pieces or adapt the whole setup to suit your needs.
- Clone the repository and run
./install. - Version checks run during setup using a PATH built from the
pathsdefined in.chezmoi.toml.tmpland warn only when a tool is older than the listed minimum version or the comparison fails. - Open a new terminal and check the prompt, aliases and git settings.
- Start
tmuxto see the multiplexer configuration. - Inspect
.chezmoitemplatesto learn how the templates are structured.
Use ejson to store secrets such as a GitLab OAuth client ID. Create an encrypted
file named private_gitlab_oauth.ejson:
-
Install ejson.
-
Generate a keypair and save the secret key:
ejson keygen -w
Note the printed public key and keep the private key in the output path.
-
Create
private_gitlab_oauth.ejsoncontaining your public key and OAuth client ID:{ "_public_key": "<public key>", "gitlab_oauth_client_id": "<your client ID>" } -
Encrypt the file:
ejson encrypt private_gitlab_oauth.ejson
Store the private key where ejson can read it when applying your dotfiles.
Feel free to change the JSON keys to suit whichever credentials you need to
encrypt.
Git initialises new repositories using the contents of
~/.config/git/template. chezmoi copies everything under
dot_config/git/template into this directory. Update the stub README.md and
.gitignore files there to provide your own defaults for new repositories,
then run chezmoi apply to install them.
Chezmoi includes a run-once script that sets KDE's super user command to sudo when kwriteconfig6 is present. If you install KDE after applying these dotfiles, run chezmoi apply again to trigger the script.
dot_gitconfig.tmpl chooses a default editor based on what is installed. On
Windows it searches the directories pointed to by the ProgramFiles,
ProgramFiles(x86) and SystemRoot environment variables. GUI tools are
preferred: notepad++, gvim, Visual Studio Code (code), IntelliJ
(idea64) and finally plain notepad. Other systems use neovim or vim
when available.
If you want a different editor, override the setting after applying the
dotfiles:
git config --global core.editor <command>
## SSH configuration
The default SSH configuration adds keys to your agent, stores passphrases in the
macOS keychain and limits authentication to the specified identities:
```sshconfig
Host *
UseKeychain yes
AddKeysToAgent yes
IdentitiesOnly yesTo disable or override these options, create another Host block with your
preferred values. For example:
Host legacy.example.com
UseKeychain no
AddKeysToAgent no
IdentitiesOnly noThese dotfiles include a template for foot, a fast Wayland terminal. Install foot from your package manager and apply the configuration:
chezmoi applyTo make foot the default terminal on systems that support update-alternatives,
run:
sudo update-alternatives --set x-terminal-emulator /usr/bin/foot