fix(post-install): seed stasis config into user home

Stasis ignores /etc/xdg/ and only reads ~/.config/stasis/stasis.rune
(primary) or /etc/stasis/stasis.rune (fallback). On first start with no
user config it writes its own hardcoded default, so Moonarch's tuned
idle plans were never active on fresh installs.

Seed the template from /etc/xdg/stasis/stasis.rune into the user home
before stasis ever starts, only if the user file is missing. See
DECISIONS.md for verification against upstream v1.1.0.
This commit is contained in:
2026-04-22 08:49:04 +02:00
parent 373bfd4a9b
commit 9432bc4831
2 changed files with 17 additions and 0 deletions
+11
View File
@@ -119,6 +119,17 @@ if [[ ! -f "$HOME/.zshrc" ]]; then
echo "source /etc/zsh/zshrc.moonarch" >> "$HOME/.zshrc"
fi
# --- Seed Stasis user config ---
#
# Stasis reads ~/.config/stasis/stasis.rune (or /etc/stasis/stasis.rune as
# fallback) but never /etc/xdg/. Without a user config it writes its own
# upstream default on first start. Seed Moonarch's template so the bootstrap
# sees an existing file and skips. Never overwrite an existing user config.
if [[ ! -f "$HOME/.config/stasis/stasis.rune" && -f /etc/xdg/stasis/stasis.rune ]]; then
log "Seeding Moonarch stasis config to user home."
install -Dm644 /etc/xdg/stasis/stasis.rune "$HOME/.config/stasis/stasis.rune"
fi
# --- Enable systemd user services ---
log "Enabling systemd user services..."