Switch install.sh to GNU Stow for symlinking

Manual ln -sfn loop replaced with stow zsh gnupg, matching the repo's
existing per-package-directory convention. Still backs up/removes any
conflicting file or foreign symlink at the target before stowing.
This commit is contained in:
2026-07-25 23:38:05 +03:00
parent a48be5af09
commit 9370afd396
2 changed files with 41 additions and 22 deletions
+11 -5
View File
@@ -5,15 +5,21 @@ My configuration files that keep me from flipping a table after logging in.
## Setup
```
sudo pacman -S stow # or your distro's equivalent
git clone https://github.com/andwati/dotfiles ~/dev/dotfiles
~/dev/dotfiles/install.sh
```
Symlinks `zsh/.zshrc`, `zsh/.zshenv`, `zsh/.zprofile`, `zsh/.p10k.zsh`, and
`gnupg/.gnupg/gpg-agent.conf` into `$HOME`, and clones oh-my-zsh plus the
theme/plugins `.zshrc` expects (powerlevel10k, zsh-autosuggestions,
zsh-syntax-highlighting, zsh-history-substring-search, zsh-completions,
you-should-use).
Each top-level directory is a [GNU Stow](https://www.gnu.org/software/stow/)
package mirroring `$HOME` (e.g. `zsh/.zshrc` -> `~/.zshrc`). `install.sh`
clones oh-my-zsh plus the theme/plugins `.zshrc` expects (powerlevel10k,
zsh-autosuggestions, zsh-syntax-highlighting, zsh-history-substring-search,
zsh-completions, you-should-use), then runs `stow zsh gnupg` to link
everything in, backing up any conflicting real files it finds first (e.g.
oh-my-zsh's own freshly-installed `.zshrc`).
To add a new package: create a top-level dir shaped like `$HOME` (e.g.
`git/.gitconfig`), then add a `stow_package <name>` call in `install.sh`.
`gpg-agent.conf` caches your GPG passphrase for 8 hours (24h hard cap)
instead of the 10-minute default, so signed commits don't re-prompt