# Finishes an omarchy-system-factory-reset reset on the first boot after it: drops
# the previous root, recreates @home/@log, and scrubs state. Ordered before
# home.mount/var-log.mount so those subvolumes can be deleted and recreated
# while unmounted. Armed by /var/lib/omarchy/provisioning/wipe-pending; installed to
# /etc/systemd/system by omarchy-system-factory-reset.

[Unit]
Description=Omarchy factory reset wipe
DefaultDependencies=no
ConditionPathExists=/var/lib/omarchy/provisioning/wipe-pending
After=systemd-remount-fs.service
Before=sysinit.target home.mount var-log.mount var-cache-pacman-pkg.mount shutdown.target
Conflicts=shutdown.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/omarchy-system-factory-reset-finish

[Install]
WantedBy=sysinit.target
