Compare commits
3 Commits
c2cee85488
...
6e14258ad9
| Author | SHA1 | Date | |
|---|---|---|---|
| 6e14258ad9 | |||
| 9432bc4831 | |||
| 373bfd4a9b |
@ -44,7 +44,7 @@ Waybar wird über `moonarch-waybar` gestartet (nicht direkt). Der Wrapper merged
|
|||||||
Diagnose-Script das den Systemzustand gegen moonarch-Defaults prüft:
|
Diagnose-Script das den Systemzustand gegen moonarch-Defaults prüft:
|
||||||
- Pakete (official.txt + aur.txt installiert? Orphans?)
|
- Pakete (official.txt + aur.txt installiert? Orphans?)
|
||||||
- System-Services (NetworkManager, bluetooth, greetd, ufw, auto-cpufreq, etc.)
|
- System-Services (NetworkManager, bluetooth, greetd, ufw, auto-cpufreq, etc.)
|
||||||
- User-Services (kanshi, stasis, cliphist-text, cliphist-image)
|
- User-Services (kanshi, wlsunset, stasis, walker, nautilus, cliphist-text, cliphist-image)
|
||||||
- Config-Dateien (SHA256-Vergleich deployed vs. moonarch-Default)
|
- Config-Dateien (SHA256-Vergleich deployed vs. moonarch-Default)
|
||||||
- Helper-Scripts + Symlinks (moonup, moondoc)
|
- Helper-Scripts + Symlinks (moonup, moondoc)
|
||||||
- System-Config (UFW, Pacman/Paru Repos, Default Shell)
|
- System-Config (UFW, Pacman/Paru Repos, Default Shell)
|
||||||
|
|||||||
11
DECISIONS.md
11
DECISIONS.md
@ -1,5 +1,16 @@
|
|||||||
# Decisions
|
# Decisions
|
||||||
|
|
||||||
|
## 2026-04-22 – moonarch-doctor housekeeping: drop stale check, add missing services
|
||||||
|
- **Who**: Dominik, ClaudeCode
|
||||||
|
- **Why**: Noticed while running `moondoc` on a healthy system that it reported `Paru [moonarch-pkgbuilds] repo missing from /etc/paru.conf` — a false failure. The paru PKGBUILD-repo mechanism was retired on 2026-04-20 in favor of the registry-only flow, and the `moonarch-git` install hook strips the legacy paru.conf section on upgrade; the doctor script was not updated in lockstep. Audit of the rest of the script surfaced two related gaps: the user-services loop skipped `walker.service` and `nautilus.service`, even though the PKGBUILD ships both in `/etc/systemd/user/` and enables them via `graphical-session.target.wants` symlinks. A silently missing walker or nautilus would not show up in diagnostics.
|
||||||
|
- **How**: Removed the `[moonarch-pkgbuilds]` check from `scripts/moonarch-doctor`. Added `walker` and `nautilus` to the user-service loop. Updated `CLAUDE.md` user-services listing to match (also filled in the missing `wlsunset`). The `[moonarch]` pacman-repo check stays — that is the path that matters now.
|
||||||
|
|
||||||
|
## 2026-04-22 – Seed Stasis user config from post-install.sh
|
||||||
|
- **Who**: Dominik, ClaudeCode
|
||||||
|
- **Why**: Moonarch shipped `defaults/xdg/stasis/stasis.rune` (deployed to `/etc/xdg/stasis/stasis.rune` by the PKGBUILD) on the assumption that stasis honors the XDG system config hierarchy. It does not. Verified against upstream source (v1.1.0, `src/config/mod.rs:30` + `src/config/bootstrap.rs`): stasis only reads `~/.config/stasis/stasis.rune` (primary) or `/etc/stasis/stasis.rune` (fallback, no `xdg/`). On every start with no user config, `ensure_user_config_exists()` writes its own hardcoded default (laptop/desktop template compiled into the binary) to `~/.config/stasis/stasis.rune`. Net effect: Moonarch's Idle-Manager tuning (AC/battery plans, moonlock integration, inhibit apps, niri DPMS commands) was never active on fresh installs — users got the upstream defaults with `swaylock` as locker.
|
||||||
|
- **Tradeoffs**: Three options were considered. (A) Service drop-in with `--config /etc/stasis/stasis.rune` — cleanest, upgrades propagate via package, no user-home touching; rejected because it takes stasis out of the standard config path users expect when they want to customize, and requires packaging a drop-in unit. (B) Seed once from post-install.sh into `~/.config/stasis/stasis.rune` — chosen: user-owned file, immediately editable, no magic. Cost: package updates to the template never reach users who already ran post-install; they have to merge manually. (C) Recurring systemd user service that keeps seeding — ruled out, too clever, user edits would race with it. Stasis has no config hierarchy / merging, so "system default + user override" cannot be modeled at all.
|
||||||
|
- **How**: Added a block to `scripts/post-install.sh` before the user-services-enable step: if `~/.config/stasis/stasis.rune` does not exist and `/etc/xdg/stasis/stasis.rune` does, `install -Dm644` copies the template into the user home. Order is correct — moonarch-git is installed earlier in the script (deploys `/etc/xdg/…`), and stasis.service is only *enabled* (not started) later, so the seed is in place before stasis ever runs. The `/etc/xdg/stasis/` payload stays as the canonical template source inside the package.
|
||||||
|
|
||||||
## 2026-04-21 – post-install.sh pulls aur.txt, rust for paru build, rustup out of official
|
## 2026-04-21 – post-install.sh pulls aur.txt, rust for paru build, rustup out of official
|
||||||
- **Who**: Dominik, ClaudeCode
|
- **Who**: Dominik, ClaudeCode
|
||||||
- **Why**: Three related gaps uncovered while fixing the paru bootstrap: (1) `moonarch-git` cannot depend on AUR packages, so every AUR package in `aur.txt` (walker-bin, elephant-*-bin, awww's theme, waypaper, stasis, …) was silently never installed by post-install.sh — a fresh install would have a working pacman but no launcher, no idle manager, no theming. (2) `makepkg -si` for `paru` (AUR source build) needs `rust` as makedep; neither archinstall nor post-install.sh installed it, so the restored paru bootstrap would have crashed on rust-less systems. (3) `rustup` sat in `official.txt` "for something we don't remember" — turned out to be a leftover; `rust` suffices for the paru build, and rustup is only needed for dev toolchain management which is a per-user concern, not a Moonarch default.
|
- **Why**: Three related gaps uncovered while fixing the paru bootstrap: (1) `moonarch-git` cannot depend on AUR packages, so every AUR package in `aur.txt` (walker-bin, elephant-*-bin, awww's theme, waypaper, stasis, …) was silently never installed by post-install.sh — a fresh install would have a working pacman but no launcher, no idle manager, no theming. (2) `makepkg -si` for `paru` (AUR source build) needs `rust` as makedep; neither archinstall nor post-install.sh installed it, so the restored paru bootstrap would have crashed on rust-less systems. (3) `rustup` sat in `official.txt` "for something we don't remember" — turned out to be a leftover; `rust` suffices for the paru build, and rustup is only needed for dev toolchain management which is a per-user concern, not a Moonarch default.
|
||||||
|
|||||||
@ -217,7 +217,7 @@
|
|||||||
},
|
},
|
||||||
"exec": "moonarch-waybar-updates",
|
"exec": "moonarch-waybar-updates",
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"on-click": "foot moonarch-update"
|
"on-click": "foot env MOONUP_WAIT=1 moonarch-update"
|
||||||
},
|
},
|
||||||
"custom/notification": {
|
"custom/notification": {
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
|
|||||||
@ -178,7 +178,7 @@ section "User Services"
|
|||||||
if [[ $EUID -eq 0 ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
warn "Running as root — skipping user service checks"
|
warn "Running as root — skipping user service checks"
|
||||||
else
|
else
|
||||||
for svc in kanshi wlsunset stasis cliphist-text cliphist-image; do
|
for svc in kanshi wlsunset stasis walker nautilus cliphist-text cliphist-image; do
|
||||||
check_user_service "$svc"
|
check_user_service "$svc"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -270,13 +270,6 @@ else
|
|||||||
fail "Pacman [moonarch] repo missing from /etc/pacman.conf"
|
fail "Pacman [moonarch] repo missing from /etc/pacman.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Paru PKGBUILD repo
|
|
||||||
if grep -q '\[moonarch-pkgbuilds\]' /etc/paru.conf 2>/dev/null; then
|
|
||||||
pass "Paru [moonarch-pkgbuilds] repo configured"
|
|
||||||
else
|
|
||||||
fail "Paru [moonarch-pkgbuilds] repo missing from /etc/paru.conf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Default shell
|
# Default shell
|
||||||
USER_SHELL=$(getent passwd "$USER" | cut -d: -f7)
|
USER_SHELL=$(getent passwd "$USER" | cut -d: -f7)
|
||||||
if [[ "$USER_SHELL" == */zsh ]]; then
|
if [[ "$USER_SHELL" == */zsh ]]; then
|
||||||
|
|||||||
@ -19,6 +19,21 @@ _t() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Pause on exit when launched from a GUI (Waybar sets MOONUP_WAIT=1).
|
||||||
|
# Runs via trap so it fires even when `set -e` aborts the script mid-way.
|
||||||
|
_pause_on_exit() {
|
||||||
|
local rc=$?
|
||||||
|
if [[ -n "${MOONUP_WAIT:-}" && -t 0 ]]; then
|
||||||
|
echo
|
||||||
|
if (( rc != 0 )); then
|
||||||
|
echo -e "\e[1;31m[Moonarch ERROR]\e[0m $(_t "Exited with error (code $rc)" "Mit Fehler beendet (Code $rc)")" >&2
|
||||||
|
fi
|
||||||
|
read -n 1 -s -r -p "$(_t "Press any key to close..." "Beliebige Taste drücken zum Schließen …")" || true
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
trap _pause_on_exit EXIT
|
||||||
|
|
||||||
# --- Helper functions ---
|
# --- Helper functions ---
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
@ -120,9 +135,3 @@ log ""
|
|||||||
log "============================================"
|
log "============================================"
|
||||||
log " $(_t "Moonarch update complete!" "Moonarch-Aktualisierung abgeschlossen!")"
|
log " $(_t "Moonarch update complete!" "Moonarch-Aktualisierung abgeschlossen!")"
|
||||||
log "============================================"
|
log "============================================"
|
||||||
|
|
||||||
# Keep terminal open when launched from a GUI (e.g. Waybar on-click)
|
|
||||||
if [[ -t 0 ]]; then
|
|
||||||
echo
|
|
||||||
read -n 1 -s -r -p "$(_t "Press any key to close..." "Beliebige Taste drücken zum Schließen …")"
|
|
||||||
fi
|
|
||||||
|
|||||||
@ -119,6 +119,17 @@ if [[ ! -f "$HOME/.zshrc" ]]; then
|
|||||||
echo "source /etc/zsh/zshrc.moonarch" >> "$HOME/.zshrc"
|
echo "source /etc/zsh/zshrc.moonarch" >> "$HOME/.zshrc"
|
||||||
fi
|
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 ---
|
# --- Enable systemd user services ---
|
||||||
|
|
||||||
log "Enabling systemd user services..."
|
log "Enabling systemd user services..."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user