aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-11 11:21:22 -0500
committerCraig Jennings <c@cjennings.net>2026-06-11 11:21:22 -0500
commite688d70ed400d8ea1e293493eddbf5e237854823 (patch)
treea90c715b4f384de8e98abd5f2df6a051cb7b70cb
parent81beadb39231b3c3533bb2e9fc5fd3d5b30abd53 (diff)
downloadarchsetup-e688d70ed400d8ea1e293493eddbf5e237854823.tar.gz
archsetup-e688d70ed400d8ea1e293493eddbf5e237854823.zip
feat(install): stow the per-host dotfiles tier when one exists
Mirrors the dotfiles Makefile semantics: a package named after the machine (/etc/hostname, uname -n fallback) is stowed after common + DE when the directory exists, skipped with a message otherwise. Hosts without a tier — including the test VM — see no behavior change.
-rwxr-xr-xarchsetup12
1 files changed, 12 insertions, 0 deletions
diff --git a/archsetup b/archsetup
index d0a2e3d..402fd9e 100755
--- a/archsetup
+++ b/archsetup
@@ -1030,6 +1030,18 @@ user_customizations() {
action="linking $desktop_env dotfiles" && display "task" "$action"
(cd "$dotfiles_dir" && stow --target="/home/$username" --no-folding --adopt "$desktop_env" \
>> "$logfile" 2>&1) || error_warn "$action" "$?"
+
+ # Per-host override tier: a stow package named after this machine
+ # (ratio/, velox/) — same semantics as the dotfiles Makefile. A
+ # host without a tier is skipped with a message, not an error.
+ host_tier="$(cat /etc/hostname 2>/dev/null || uname -n)"
+ if [ -n "$host_tier" ] && [ -d "$dotfiles_dir/$host_tier" ]; then
+ action="linking $host_tier host-tier dotfiles" && display "task" "$action"
+ (cd "$dotfiles_dir" && stow --target="/home/$username" --no-folding --adopt "$host_tier" \
+ >> "$logfile" 2>&1) || error_warn "$action" "$?"
+ else
+ display "task" "no host tier for '$host_tier' in dotfiles — skipping"
+ fi
;;
none)
action="linking minimal dotfiles" && display "task" "$action"