From 613f4a473db5a891f3192c5d692e711238a24615 Mon Sep 17 00:00:00 2001 From: Michiel Ryvers Date: Wed, 27 Aug 2025 11:08:16 +0200 Subject: [PATCH 1/2] Don't hardcode snapper configs, read the config list first --- bin/omarchy-snapshot | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-snapshot b/bin/omarchy-snapshot index b4d78f11..3813ef5f 100755 --- a/bin/omarchy-snapshot +++ b/bin/omarchy-snapshot @@ -16,7 +16,10 @@ case "$COMMAND" in create) DESC="$(omarchy-version)" - for config in root home; do + # Get existing snapper config names from CSV output + mapfile -t CONFIGS < <(sudo snapper --csvout list-configs | awk -F, 'NR>1 {print $1}') + + for config in "${CONFIGS[@]}"; do sudo snapper -c "$config" create -c number -d "$DESC" done ;; From 5f2b6566f12b65530ae22d79b35706388bae0704 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Thu, 28 Aug 2025 12:11:26 +0300 Subject: [PATCH 2/2] Add missing configs if user already had snapper --- migrations/1756153445.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 migrations/1756153445.sh diff --git a/migrations/1756153445.sh b/migrations/1756153445.sh new file mode 100644 index 00000000..63441e2f --- /dev/null +++ b/migrations/1756153445.sh @@ -0,0 +1,10 @@ +echo "Checking and correcting Snapper configs if needed" +if command -v snapper &>/dev/null; then + if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then + sudo snapper -c root create-config / + fi + + if ! sudo snapper list-configs 2>/dev/null | grep -q "home"; then + sudo snapper -c home create-config /home + fi +fi