aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:39 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:39 +0100
commitf1837fdee1df25022a975e60a48ca6085b2d1b55 (patch)
treec722fdcfe3f9fd3791db494a8545e7bdd346ccb7 /bootstrap.sh
parenta13be81f89f44679553e640b57c18565396dafa7 (diff)
downloaddotfiles-f1837fdee1df25022a975e60a48ca6085b2d1b55.tar.gz
dotfiles-f1837fdee1df25022a975e60a48ca6085b2d1b55.tar.bz2
dotfiles-f1837fdee1df25022a975e60a48ca6085b2d1b55.zip
feat(services): curated systemd units via just recipes
Introduce systemd-units/<group>.txt files paired by name with meta groups (systemd-units/base.txt <-> meta/base.txt). Units listed there are enabled by a new 'just services-enable' recipe, wired into 'just init' so bootstrap.sh no longer needs its own systemctl loop. New justfile recipes (Services section): services list curated units with enabled/active state services-enable idempotent 'systemctl enable --now', soft-fail per unit services-drift two-way diff vs systemctl list-unit-files bootstrap.sh drops its hardcoded 9-unit loop and laptop TLP block (~22 lines); 'just init' now handles it. tlp.service lives directly in systemd-units/base.txt (no laptop gating).
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh30
1 files changed, 3 insertions, 27 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index c5cbb26..dbe9495 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -70,43 +70,19 @@ cd "$DOTFILES_DIR"
log 'running just init'
just init
-# 6. enable recommended systemd units for daemons that base.txt installs.
-# Soft-fail: warn on a single failure but keep going.
-log 'enabling system services'
-for u in \
- fstrim.timer \
- systemd-timesyncd.service \
- systemd-resolved.service \
- reflector.timer \
- paccache.timer \
- pkgstats.timer \
- acpid.service \
- cpupower.service \
- iwd.service
-do
- sudo systemctl enable --now "$u" \
- || warn "could not enable $u"
-done
-
-# tlp: laptops only
-if ls /sys/class/power_supply/BAT* >/dev/null 2>&1; then
- sudo systemctl enable --now tlp.service \
- || warn 'could not enable tlp.service'
-fi
-
-# 7. refresh pacman mirrorlist once via reflector (config deployed by chezmoi)
+# 6. refresh pacman mirrorlist once via reflector (config deployed by chezmoi)
log 'refreshing pacman mirrorlist via reflector'
sudo reflector @/etc/xdg/reflector/reflector.conf \
--save /etc/pacman.d/mirrorlist \
|| warn 'reflector failed; keeping existing mirrorlist'
-# 8. create XDG user directories (~/Documents, ~/Downloads, etc.)
+# 7. create XDG user directories (~/Documents, ~/Downloads, etc.)
if command -v xdg-user-dirs-update >/dev/null 2>&1; then
log 'creating XDG user directories'
xdg-user-dirs-update || warn 'xdg-user-dirs-update failed'
fi
-# 9. optional: create an Arch EFI boot entry if none exists
+# 8. optional: create an Arch EFI boot entry if none exists
if [ -d /sys/firmware/efi ]; then
if ! sudo efibootmgr 2>/dev/null | grep -iq arch; then
log 'no Arch Linux EFI boot entry found; launching create-efi'