Centralize service enables into install/config/enable-services.sh

The previous setup scattered systemctl enables across docker.sh,
printer.sh, bluetooth.sh, network.sh, powerprofilesctl-rules.sh, and
kernel-modules-hook.sh. Some used chrootable_systemctl_enable; others
used bare 'sudo systemctl enable'. Centralizing makes the install-time
service surface auditable in one place and consistent in chroot/non-chroot
behavior.

install/config/enable-services.sh enables:
- bluetooth.service
- cups.service, cups-browsed.service, avahi-daemon.service
- docker.socket
- iwd.service
- linux-modules-cleanup.service
- power-profiles-daemon.service

Each via chrootable_systemctl_enable, which uses 'enable --now' on a live
system and bare 'enable' in chroot (set OMARCHY_CHROOT_INSTALL=1).

Stays in original script (deliberately):
- sddm.sh: bare 'systemctl enable sddm.service' (no --now during install
  would log the user out; lives in install/login/)
- limine-snapper.sh: limine-snapper-sync (bootloader-specific path)
- first-run/firewall.sh: ufw (deferred to first-run for UX)
- hardware/{t2,intel/lpmd,intel/thermald,apple/fix-suspend-nvme}: gated
  on hardware detection

Side cleanups:
- install/config/kernel-modules-hook.sh: DELETED (sole line was the enable
  for linux-modules-cleanup, now in enable-services.sh).
- install/config/hardware/printer.sh: DELETED (sole purpose was the
  three cups/avahi enables; nothing else to do).
- install/config/hardware/network.sh: keep the systemd-networkd-wait-online
  disable+mask; drop the iwd enable.
- install/config/hardware/bluetooth.sh: keep the AutoEnable=false sed and
  the wireplumber/bt-agent user-session setup; drop the system enable.
- install/config/docker.sh: drop the docker.socket enable.
- install/config/powerprofilesctl-rules.sh: drop the
  power-profiles-daemon enable.
- install/config/all.sh: register enable-services.sh; remove the two
  deleted entries.
This commit is contained in:
Ryan Hughes
2026-06-04 18:34:04 -04:00
parent 080c8ba38c
commit 12826d4076
7 changed files with 24 additions and 26 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
# Turn on bluetooth by default
chrootable_systemctl_enable bluetooth.service
# bluetooth.service enable lives in install/config/enable-services.sh.
# Persist last power state across reboots (default AutoEnable=true overrides it)
sudo sed -i 's/^#\?AutoEnable=.*/AutoEnable=false/' /etc/bluetooth/main.conf
-9
View File
@@ -1,9 +0,0 @@
# Printer config files now ship via omarchy-settings:
# - etc/systemd/resolved.conf.d/10-disable-multicast.conf (package-owned drop-in)
# - etc/nsswitch.conf (etc-overrides, replaces the previous in-place sed)
# - etc/cups/cups-browsed.conf (etc-overrides, replaces the previous append)
#
# This script only handles service enables, which the configurator path needs.
chrootable_systemctl_enable cups.service
chrootable_systemctl_enable avahi-daemon.service
chrootable_systemctl_enable cups-browsed.service