From bab6901df8bbd9674d7adc0dea8818238d7b873b Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 22 May 2026 15:52:24 -0500 Subject: feat(archsetup): clone dotfiles repo and stow per DESKTOP_ENV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dotfiles now live in their own repo (git.cjennings.net/dotfiles.git), so archsetup clones DOTFILES_REPO to the user's ~/.dotfiles and stows the right tree for the chosen DESKTOP_ENV: dwm and hyprland get common/ plus their own layer, none gets the standalone minimal/ tree. The clone runs as the target user, so the working tree is user-owned with no chown-after race. Add DOTFILES_REPO / DOTFILES_BRANCH / DOTFILES_DIR config keys with the same injection guard the other repo keys carry. If the clone doesn't produce a git checkout, error_fatal stops the install rather than silently skipping the restore step that reverts what stow --adopt pulled in. That restore now runs for every DESKTOP_ENV, including none — minimal/ ships the .bashrc/.bash_profile that collide with /etc/skel, so its --adopt needs the same cleanup. --- archsetup.conf.example | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'archsetup.conf.example') diff --git a/archsetup.conf.example b/archsetup.conf.example index fe8cd26..f866134 100644 --- a/archsetup.conf.example +++ b/archsetup.conf.example @@ -55,3 +55,19 @@ #SLOCK_REPO=https://github.com/yourusername/slock.git #DOTEMACS_REPO=https://github.com/yourusername/dotemacs.git #ARCHSETUP_REPO=https://github.com/yourusername/archsetup.git + +############################# +# Dotfiles +############################# +# Dotfiles live in their own repo, cloned to DOTFILES_DIR and stowed at install +# time. The repo must contain a common/ subdir plus dwm/, hyprland/, and/or +# minimal/ subdirs that stow cleanly to ~. DESKTOP_ENV picks which: +# dwm -> common/ + dwm/ +# hyprland -> common/ + hyprland/ +# none -> minimal/ only +#DOTFILES_REPO=https://git.cjennings.net/dotfiles.git +#DOTFILES_BRANCH=main +# DOTFILES_DIR: leave unset to use the target user's ~/.dotfiles (recommended). +# If you set it, use a literal absolute path under the user's home — this file is +# sourced as root, so $HOME here is /root, not the user's home. +#DOTFILES_DIR=/home/youruser/.dotfiles -- cgit v1.2.3