https://www.youtube.com/watch?v=fn1R-5p_j5c
This repository is for @jatkinson1000's dotfiles for personal configuration of machines.
The setup is heavily based on this guide by durdn which is, itself, based on a Hacker News thread.
There are different branches for different machines.
Updates to cover all machines are made in main, with machine-specific branches.
Where possible I have annotated with comments, as whenever I look at others' dotfiles they can be hard to interpret if you want to build on them.
.dotfiles/
- The main git repo and any files I don't want to appear in $HOMELICENSE
- license for this repository.software_list
- list of software to install to ensure dotfiles operate correctly
.github
- directory to allow github to detect the READMEREADME.md
- description of how to set up and maintain this system.
main
- Arch linux machineOSX
- Apple Silicon maccheyenne
- Cheyenne HPC (NCAR)levante
- Levante HPC (DKRZ)carpentries
- Simplified profiles to use when teaching
Initialise a bare git repo in $HOME
called something other than .git
.
Set up an alias for operating this repo that is something other than git
.
Set it so that any untracked files in $HOME
aren't displayed in git status
.
Add the alias to your profile for future use.
For example in bash:
git init --bare $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no
You also want to add the following to your .bashrc
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
_completion_loader git
$(complete -p git | sed 's/ git//') dotfiles
If storing on a remote repository you may want to add it now:
dotfiles remote add origin [email protected]:jatkinson1000/dotfiles.git
You can now operate like a normal git repo using the dotfiles
command:
dotfiles status
dotfiles add .newdotfile
dotfiles commit -m "Added newdotfile"
dotfiles push
The following files need decrypting:
gpg --decrypt .config/neomutt/aliases.mutt.asc > .config/neomutt/aliases.mutt
gpg --decrypt .config/neomutt/acounts/gmail-local.asc > .config/neomutt/accounts/gmail-local
gpg --decrypt .config/mbsync.asc > .config/mbsync
gpg --decrypt .config/msmtp/config.asc > .config/msmtp/config
Remember to re-encrypt them if you ever want to push back up any changes.
After installing these dotfiles you will also need to set up passwords through
pass
. This has not been included in this repo for
obvious reasons.
You will also need to set up and/or import ssh/gpg keys for the machine and add the public keys to any other machines as necessary.
You will need to enable the systemd jobs for mail updates and syncing:
systemctl daemon-reload
systemctl enable --user mbsync.service
systemctl start --user mbsync.service
systemctl enable --user [email protected]
systemctl start --user [email protected]
if doing so, consider extending the gpg timeout in .gnupg/gpg-agent.conf
,
or stopping the systemd service when you don't want to be disturbed.
If you cannot send mail automatically you may need to chmod 600 .config/msmtp/config
.
Similarly for weather in waybar you may need to chmod +x .config/waybar/scripts/weather.py
.
- Neomutt workflow - blog post
- Neomutt, mbsync, msmtp, notmuch - blog post
- imapnotify for push notifications - Arch page
The code in this repo builds on various open source resources which I have tried to include above. In the spirit of FOSS it is available for others to use under GPL-3.0.
If you find a better way of doing something than what I have done here please consider opening an issue or a pull request.
It is expected that any discussion around this repo treats everyone with respect and, more generally, follows the guidelines articulated in the Python Community Code of Conduct.
If you have found this repo useful, and can afford to do so, please consider buying me a coffee.