feat: migrated to chezmoi

This commit is contained in:
2026-07-30 04:25:19 +02:00
parent 340b955bc5
commit 73fe6b87a9
160 changed files with 902 additions and 6470 deletions
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# run_once_30-install-power-mgmt.sh
# Laptop-only: power management stack. Skipped on desktop/server.
set -euo pipefail
SYS="$(chezmoi data --format=json 2>/dev/null | jq -r '.system // "desktop"')"
DISTRO_ID="$(chezmoi data --format=json 2>/dev/null | jq -r '.chezmoi.osRelease.id // empty')"
if [ "$SYS" != "laptop" ]; then
echo ">>> [power-mgmt] system=$SYS, skipping (not a laptop)"
exit 0
fi
case "$DISTRO_ID" in
arch)
echo ">>> [power-mgmt] arch"
sudo pacman -S --noconfirm --needed tlp auto-cpufreq power-profiles-daemon
sudo systemctl enable tlp
sudo systemctl enable auto-cpufreq
sudo systemctl enable power-profiles-daemon
;;
ubuntu)
echo ">>> [power-mgmt] ubuntu"
sudo apt-get install -y tlp tlp-rdw power-profiles-daemon
sudo systemctl enable tlp
# tlp and power-profiles-daemon conflict on most hardware — mask the latter
sudo systemctl mask power-profiles-daemon || true
;;
*)
echo ">>> [power-mgmt] unsupported distro: ${DISTRO_ID:-unknown}, skipping"
exit 0
;;
esac
echo ">>> [power-mgmt] done"