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
commit3541214f3f21c292a3d6b0ba0ed7cfcceb99abf8 (patch)
tree020a244121480b91d7348a85231e667e7f19fddd
parent36fc4a2273d804131fb2fb932c795aa9e8f53909 (diff)
downloadarchsetup-3541214f3f21c292a3d6b0ba0ed7cfcceb99abf8.tar.gz
archsetup-3541214f3f21c292a3d6b0ba0ed7cfcceb99abf8.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"