A root systemd service applies pacman, AUR, Flatpak and AppImage updates on its own, gated on battery state, gaming activity and whether anybody else is using the package system. The CLI is deliberately two switches plus status. No user password is stored anywhere: pacman runs as root directly, and the AUR step - which makepkg forbids running as root - drops to a locked system account that sudoers permits to call pacman without a password.
20 lines
547 B
SYSTEMD
20 lines
547 B
SYSTEMD
[Unit]
|
|
Description=CachyOS unattended update check
|
|
Documentation=man:cachy-auto-update(1)
|
|
|
|
[Timer]
|
|
# The tick is hourly, but an actual update only happens once per
|
|
# UpdateInterval (default: daily). That combination is what makes a postponed
|
|
# run - low battery, a game running, somebody else using pacman - retry by
|
|
# itself an hour later without any backoff bookkeeping.
|
|
OnBootSec=15min
|
|
OnCalendar=hourly
|
|
RandomizedDelaySec=20min
|
|
AccuracySec=5min
|
|
|
|
# Catch up after the machine was switched off.
|
|
Persistent=true
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|