Files
arthur-os/bin/omarchy-update-system-pkgs
T
Ryan Hughes dcac0ed953 Convert plocate-ac-only, power-profile, wifi-powersave, unmount-fuse to package files
Four scripts that wrote static /etc or /usr files become package-shipped
files. The other config-script audit candidates (omarchy-ai-skill,
nautilus-python, omarchy-toggles, input-group) correctly stay scripts —
they're user-level operations, not /etc writes.

New package-owned files (omarchy-installer/etc/, shipped by
omarchy-settings):
- etc/systemd/system/plocate-updatedb.service.d/ac-only.conf
- etc/udev/rules.d/99-omarchy-power-profile.rules
- etc/udev/rules.d/99-omarchy-wifi-powersave.rules

The two udev rule files are renamed for namespacing (99-power-profile
-> 99-omarchy-power-profile; 99-wifi-powersave -> 99-omarchy-wifi-powersave)
and rewritten to invoke /usr/bin/omarchy-powerprofiles-set and
/usr/bin/omarchy-wifi-powersave instead of $HOME/.local/share/omarchy/bin/...
(both binaries ship in the omarchy package at /usr/bin/).

The battery-present gate from the original scripts is dropped — the rules
trigger on power_supply udev events, which are benign on desktops without
batteries. (The runtime commands no-op on AC-only systems.)

Script changes:
- install/config/plocate-ac-only.sh: DELETED (file ships, daemon-reload
  happens via pacman hook).
- install/config/unmount-fuse.sh: DELETED (file ships at
  /usr/lib/systemd/system-sleep/unmount-fuse via omarchy-settings).
- install/config/powerprofilesctl-rules.sh: SHRINK to runtime ops
  (enable power-profiles-daemon, udevadm reload+trigger).
- install/config/wifi-powersave-rules.sh: SHRINK to udevadm reload+trigger.
- install/config/all.sh: drop the two deleted entries.

bin/omarchy-update-system-pkgs: add --overwrite for plocate-updatedb
drop-in and unmount-fuse paths (the udev rule renames need no overwrite
since the new paths are virgin).

migrations/1779307845.sh: remove the legacy 99-power-profile.rules and
99-wifi-powersave.rules paths on existing installs, then reload udev.
2026-06-04 18:34:04 -04:00

34 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# omarchy:summary=Update system packages with pacman
# omarchy:requires-sudo=true
set -e
echo -e "\e[32m\nUpdate system packages\e[0m"
# Transition --overwrite: the Omarchy 4 package refactor moves files that
# previous Omarchy installs wrote as unowned files (via install scripts) into
# the omarchy-settings package. Pacman would otherwise refuse to install
# omarchy-settings on the first upgrade because the paths "exist in
# filesystem". Limited to the exact paths the package now owns; remove the
# corresponding --overwrite entry once the transition release is everyone's
# baseline.
sudo pacman -Syyu --noconfirm \
--overwrite '/etc/docker/daemon.json' \
--overwrite '/etc/gnupg/dirmngr.conf' \
--overwrite '/etc/modprobe.d/omarchy-usb-autosuspend.conf' \
--overwrite '/etc/sudoers.d/omarchy-asdcontrol' \
--overwrite '/etc/sudoers.d/omarchy-passwd-tries' \
--overwrite '/etc/sudoers.d/omarchy-tzupdate' \
--overwrite '/etc/sysctl.d/90-omarchy-file-watchers.conf' \
--overwrite '/etc/sysctl.d/99-omarchy-sysctl.conf' \
--overwrite '/etc/systemd/logind.conf.d/10-ignore-power-button.conf' \
--overwrite '/etc/systemd/resolved.conf.d/10-disable-multicast.conf' \
--overwrite '/etc/systemd/resolved.conf.d/20-docker-dns.conf' \
--overwrite '/etc/systemd/system.conf.d/10-faster-shutdown.conf' \
--overwrite '/etc/systemd/system/user@.service.d/10-faster-shutdown.conf' \
--overwrite '/etc/systemd/system/docker.service.d/no-block-boot.conf' \
--overwrite '/etc/systemd/system/plocate-updatedb.service.d/ac-only.conf' \
--overwrite '/usr/lib/systemd/system-sleep/unmount-fuse'