diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh index e2f14815..61cec691 100644 --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -94,10 +94,15 @@ EOF fi fi + # Enable quota to allow space-aware algorithms to work + sudo btrfs quota enable / + # Tweak default Snapper configs sudo sed -i 's/^TIMELINE_CREATE="yes"/TIMELINE_CREATE="no"/' /etc/snapper/configs/{root,home} sudo sed -i 's/^NUMBER_LIMIT="50"/NUMBER_LIMIT="5"/' /etc/snapper/configs/{root,home} sudo sed -i 's/^NUMBER_LIMIT_IMPORTANT="10"/NUMBER_LIMIT_IMPORTANT="5"/' /etc/snapper/configs/{root,home} + sudo sed -i 's/^SPACE_LIMIT="0.5"/SPACE_LIMIT="0.3"/' /etc/snapper/configs/{root,home} + sudo sed -i 's/^FREE_LIMIT="0.2"/FREE_LIMIT="0.3"/' /etc/snapper/configs/{root,home} chrootable_systemctl_enable limine-snapper-sync.service fi diff --git a/migrations/1765739892.sh b/migrations/1765739892.sh new file mode 100644 index 00000000..845270b3 --- /dev/null +++ b/migrations/1765739892.sh @@ -0,0 +1,7 @@ +if omarchy-cmd-present btrfs && omarchy-cmd-present snapper; then + echo "Adjust snapper space limits & enable btrfs quota" + + sudo sed -i 's/^SPACE_LIMIT="0.5"/SPACE_LIMIT="0.3"/' /etc/snapper/configs/{root,home} 2>/dev/null + sudo sed -i 's/^FREE_LIMIT="0.2"/FREE_LIMIT="0.3"/' /etc/snapper/configs/{root,home} 2>/dev/null + sudo btrfs quota enable / +fi