feat(moonarch-git): package battery conservation mode assets

Add udev rule and systemd service to PKGBUILD. Create /var/lib/moonarch
state directory and enable batsaver restore service on laptops in the
post-install hook.
This commit is contained in:
2026-04-08 09:56:02 +02:00
parent 797037c2d9
commit 8e2fb5a9f5
2 changed files with 14 additions and 0 deletions
+6
View File
@@ -71,6 +71,12 @@ post_install() {
rm -f /usr/local/bin/swww /usr/local/bin/swww-daemon 2>/dev/null || true
rm -f /usr/local/bin/moonarch-update 2>/dev/null || true
# Battery conservation mode: create state directory and enable restore service
install -dm775 -g wheel /var/lib/moonarch
if [ -f /sys/class/power_supply/BAT0/charge_control_end_threshold ]; then
systemctl enable moonarch-batsaver.service 2>/dev/null || true
fi
echo "==> Moonarch defaults installed."
echo "==> For first-time setup run: /opt/moonarch/scripts/post-install.sh"
echo "==> This enables services and configures firewall."