Fix impermanence on boot.

This commit is contained in:
jay
2025-07-09 20:37:10 -04:00
parent e5b5d77b86
commit 3dcb5330e6

View File

@@ -2,7 +2,7 @@
# Reset root subvolume on boot
boot.initrd.postResumeCommands = lib.mkAfter ''
mkdir /btrfs_tmp
mount /dev/disk/by-partlabel/luks /btrfs_tmp # CONFIRM THIS IS CORRECT FROM findmnt
mount /dev/mapper/cryptroot /btrfs_tmp # CONFIRM THIS IS CORRECT FROM findmnt
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")