My dotfiles. The current iteration utilizes GNU Stow via make. This setup is inspired by this post.
This README is designed to be almost a lights-out installation and setup guide for new machines, too.
Base installation process follows this article for Arch (btw).
- Create a user
- Add user to
sudoers - Install package manager
sudo pacman -Syu
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
cd ~
rm -rf paru
MacPorts is assumed for macOS. Use sudo port selfupdate to update the local ports tree.
# Generate a new SSH key
ssh-keygen -t ed25519
# add ~/.ssh/id_ed25519.pub to Github
ssh-agent
# run commands output by ^
ssh-add ~/.ssh/id_ed25519
mkdir ~/git/
git clone git@github.com:sarumont/dotfiles.git ~/git/dotfiles
cd ~/git/dotfiles
paru -S stow
make # installs all links
sudo gpasswd -a $(whoami) disk
sudo gpasswd -a $(whoami) storage
sudo gpasswd -a $(whoami) users
sudo gpasswd -a $(whoami) input
sudo gpasswd -a $(whoami) audio
sudo gpasswd -a $(whoami) video
This repo stores global git configuration in ~/.config/git/config. This leaves ~/.gitconfig for local overrides. You can set your name and email:
git config --global user.name Zaphod Beeblebrox
git config --global user.email zaphod@heartofgold.com
We need to configure git to use your SSH key as the signing key. There should only be one key in your keyring if you've followed these instructions. If you have multiple keys, copy-paste the one you want to use rather than using the ssh-add -L command below.
git config --global user.signingkey "$(ssh-add -L)"
git config --global gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers
echo EMAIL $(ssh-add -L) > ~/.ssh/allowed_signers
Note that these commands need to be run after installing keychain
Local overrides are managed via stow using the make host command. This looks for a dir called .hosts-$(hostname) and applies that as a vault. This applies side-by-side, so it does not support overwriting.
The following local zsh overrides are supported:
.aliases.zsh->.local/sh/aliases.zsh.functions.zsh->.local/sh/functions.zsh.zlogin->.local/sh/zlogin.zshenv->.local/sh/zshenv&&.local/sh/*.zshenv.zshrc->.local/sh/zshrc
You can set OBSIDIAN_VAULT_DIR in your ~/.local/sh/zshenv to point to an Obsidian Vault. This allows obsidian.nvim to utilize it. It defaults to ~/notes
I have a private repository that is an overlay on top of this one called privfiles. I now manage it the same way (with stow) and use it to store e.g. secrets and configurations which I do not want to be public knowledge.
paru -S zsh starship neovim openssh go-yq exa eva bat hexyl zip unzip fzf ripgrep fd \
whois btop jq tmux direnv at keychain zoxide usbutils stow smartmontools mise
sudo port install starship neovim tmux tmux-pasteboard exa bat hexyl ripgrep fd btop \
direnv yq pinentry-mac keychain zoxide stow
brew install mise # not available via macports :(
# oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# change shell to zsh (Arch: /usr/bin/zsh, macOS: /bin/zsh)
chsh
# install tmux plugin manager (tpm)
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
# start tmux and run <prefix>I to install all plugins
paru -S sway waybar swaylock swaybg wob \
alacritty firefox man-db gammastep adw-gtk-theme \
polkit playerctl grimshot xorg-xwayland \
yubioath-desktop yubikey-manager \
imv mpv nautilus udevil devmon cifs-utils evince neofetch \
wl-clipboard xdg-desktop-portal-wlr darkman
systemctl --user enable --now playerctld
systemctl --user enable --now devmon
systemctl --user enable --now darkman
mkdir -p ~/.config/alacritty/themes
git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes
paru -S noto-fonts-cjk noto-fonts-emoji noto-fonts \
otf-firamono-nerd otf-fira-mono-italic-git \
ttf-dejavu \
ttf-ubuntu-nerd ttf-ubuntu-mono-nerd ttf-roboto \
ttf-roboto-mono ttf-ms-fonts
# syncthing for file synchronization
paru -S syncthing
systemctl --user enable --now syncthing
# silicon for generating screenshots of code from nvim
paru -S silicon
# Tailscale for a private VPN
paru -S tailscale
sudo systemctl enable --now tailscaled
sudo tailscale login
sudo tailscale up --operator=$(whoami) --accept-routes
paru -S battop wluma light tlp
Configure power management via the Arch Wiki article. Also this Framework thread is useful, especially for GPU rendering config.
# TODO: still WIP userspace battery charge threshold
paru -S threshy
systemctl enable --now threshy
paru -S cups
sudo gpasswd -a $(whoami) cups
paru -S pipewire pipewire-pulse easyeffects easyeffects-presets spotify \
pavucontrol lsp-plugins plexamp-appimage
systemctl --user enable --now pipewire
# configure easyeffects
# bluetooth
paru -S bluez bluez-utils bluetuith
sudo systemctl enable --now bluetooth.service
paru -S mpc ncmpcpp mpd mpdevil
paru -S python imagemagick
python -m venv ~/.beets-venv
source ~/.beets-venv/bin/activate
pip install beets pylast pyxdg httpx flask requests beets-xtractor beets-copyartifacts
Now, configure and mount your music dir. Drop the following into ~/.local/beets/config.yaml:
directory: /media/chocobo/music
library: /home/sarumont/.local/beets/library.blb
import:
log: /home/sarumont/.local/beets/import.log
And begin the import!
Development tools. Season these to taste based on your needs.
paru -S kcat-cli jwt-cli httpie aws-cli-v2-bin docker vault
paru -S rubygems
gem install schema-evolution-manager
paru -S go delve
sudo port install go delve
paru -S kubectl terragrunt helm telepresence2
paru -S rancher-k3d-bin
Most of this is from the Arch Wiki
paru -S sof-firmware intel-media-driver fprintd gnome-polkit
Edit /sys/devices/platform/i8042/serio1/sensitivity as necessary. I like 110 as the value (default is 128)
- Enable color output in
pacman/yay/paru- uncommentColorin/etc/pacman.conf - add
vers=3.0tocifsmount options in/etc/udevil/udevil.conf(both allowed and default) - enable/start
devmon:systemctl --user enable --now devmon - edit
/etc/makepkg.confand setMAKEFLAGS="-j$(nproc)"to parallelize compilation - enable/start
avahi:sudo systemctl enable --now avahi-daemon.service
I ripped this idea from Waylon Walker. Basically, this creates a directory that is a "gallery" of projects, tying into tmux keybindings (see C-w). You can add multiple galleries (work, oss, etc.) and corresponding keybindings in your tmux.conf.
I keep this as a zsh function inside of ~/.local/sh/functions.zsh and run it periodically to keep the galleries up to date:
update_link_galleries() {
rm -rf ~/work
mkdir ~/work
ln -sf ~/github.com/myorganization/* ~/work
rm -rf ~/work
mkdir ~/work
ln -sf ~/work/* ~/git
}
- Tailscale statusbar
- clipman / parcellite / clipboard manager via Wofi
- screen auto locking (w/ fprint?) swaywm/swaylock#61 (comment)
Shout-out to @notlesh for dropping me this awesome link, which has influenced some of my configuration now.