# Enable system services. enable_unit skips any unit that isn't installed yet
# (e.g. logid.service comes from the AUR logiops package, installed in the user layer).

enable_unit NetworkManager.service
enable_unit bluetooth.service
enable_unit avahi-daemon.service
enable_unit cups.socket                 # socket-activated: cups runs only on demand
enable_unit systemd-timesyncd.service
enable_unit fstrim.timer
enable_unit logid.service               # logitech mice (AUR)

# Laptop: battery/power profiles. Desktop: not useful.
[ "$IS_DESKTOP" = 0 ] && enable_unit power-profiles-daemon.service

# libvirt / KVM (modular daemons + their sockets)
for drv in qemu interface network nodedev nwfilter secret storage; do
  enable_unit "virt${drv}d.service"
  enable_unit "virt${drv}d.socket" "virt${drv}d-ro.socket" "virt${drv}d-admin.socket"
done
