fix impermanence rollback and add persistent paths
This commit is contained in:
parent
60b0b4e88e
commit
dc04bcf008
1 changed files with 18 additions and 0 deletions
|
|
@ -19,6 +19,21 @@
|
|||
fi
|
||||
|
||||
if [ -d /mnt/root ]; then
|
||||
if [ -d /mnt/root-previous ]; then
|
||||
btrfs subvolume delete /mnt/root-previous
|
||||
fi
|
||||
btrfs subvolume snapshot /mnt/root /mnt/root-previous
|
||||
|
||||
while true; do
|
||||
subvols="$(btrfs subvolume list -o /mnt/root | awk '{print $9}')"
|
||||
if [ -z "$subvols" ]; then
|
||||
break
|
||||
fi
|
||||
for subvol in $subvols; do
|
||||
btrfs subvolume delete "/mnt/$subvol"
|
||||
done
|
||||
done
|
||||
|
||||
btrfs subvolume delete /mnt/root
|
||||
fi
|
||||
|
||||
|
|
@ -34,8 +49,11 @@
|
|||
"/etc/nixos"
|
||||
"/etc/ssh"
|
||||
"/etc/cups"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/cups"
|
||||
"/var/lib/fprint"
|
||||
"/var/lib/libvirt"
|
||||
"/var/lib/NetworkManager"
|
||||
"/var/lib/secureboot"
|
||||
"/var/lib/tailscale"
|
||||
"/var/lib/systemd"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue