omarchy/bin/omarchy-snapshot
Ryan Hughes d4403051cf
Add Limine + Snapper support (#998)
* Persist urgent notifications

* Create omarchy-snapshot

* Create snapshot before pulling

* Extract alternative bootloader configs

* Add limine-snapper config

* Fix check

* Update login scripts

* Make chroot friendly

* Extract cmdline instead of using blkid due to error

* Add restore command

* Export $TERMINAL so we get clickable restore notifications

* Remove sync -- causes errors...we have nothing to sync yet

* Executable

* Minor cleanup and compatibility for non-ISO

* Give login its own section

* Give no-arg guard and inline commands

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
2025-08-23 16:52:25 +02:00

23 lines
383 B
Bash
Executable File

#!/bin/bash
COMMAND="$1"
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
if [[ -z $COMMAND ]]; then
echo "Usage: omarchy-snapshot <create|restore>" >&2
exit 1
fi
case "$COMMAND" in
create)
DESC="$(omarchy-version)"
for config in root home; do
sudo snapper -c "$config" create -c number -d "$DESC"
done
;;
restore)
sudo limine-snapper-restore
;;
esac