Make impermanence reset work on unencrypted hosts.
This commit is contained in:
@@ -64,7 +64,7 @@ in
|
|||||||
# Note `lib.mkBefore` is used instead of `lib.mkAfter` here.
|
# Note `lib.mkBefore` is used instead of `lib.mkAfter` here.
|
||||||
boot.initrd.postDeviceCommands = pkgs.lib.mkBefore ''
|
boot.initrd.postDeviceCommands = pkgs.lib.mkBefore ''
|
||||||
mkdir /mnt
|
mkdir /mnt
|
||||||
mount /dev/mapper/luksroot /mnt
|
mount ${config.fileSystems."/".device} /mnt
|
||||||
if [[ -e /mnt/root ]]; then
|
if [[ -e /mnt/root ]]; then
|
||||||
mkdir -p /mnt/old_roots
|
mkdir -p /mnt/old_roots
|
||||||
timestamp=$(date --date="@$(stat -c %Y /mnt/root)" "+%Y-%m-%-d_%H:%M:%S")
|
timestamp=$(date --date="@$(stat -c %Y /mnt/root)" "+%Y-%m-%-d_%H:%M:%S")
|
||||||
|
|||||||
Reference in New Issue
Block a user