added essentials to darling erasure

This commit is contained in:
Moritz Böhme 2021-09-30 20:26:36 +02:00
parent e9c6d14259
commit 6285172230
2 changed files with 25 additions and 0 deletions

View file

@ -58,4 +58,7 @@
# we can unmount /mnt and continue on the boot process.
umount /mnt
'';
# In case one forgets to move /etc/shadow to /persist
users.users.moritz.initialPassword = "password";
}

View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
# fs-diff.sh
set -euo pipefail
OLD_TRANSID=$(sudo btrfs subvolume find-new /mnt/root-blank 9999999)
OLD_TRANSID=${OLD_TRANSID#transid marker was }
sudo btrfs subvolume find-new "/mnt/root" "$OLD_TRANSID" |
sed '$d' |
cut -f17- -d' ' |
sort |
uniq |
while read path; do
path="/$path"
if [ -L "$path" ]; then
: # The path is a symbolic link, so is probably handled by NixOS already
elif [ -d "$path" ]; then
: # The path is a directory, ignore
else
echo "$path"
fi
done