Add a todo for semi-persistent/expiring roots

This commit is contained in:
ItsDrike 2024-04-08 01:53:52 +02:00
parent 294789d9bb
commit a6cf555b00
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -18,6 +18,12 @@ in
unitConfig.DefaultDependencies = "no"; unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
script = let script = let
# TODO: Consider adding support for moving the subvolume to something like old-roots
# instead of deleting it. This would allow for easier recovery in case of a mistake.
# The subvolume can live here for a certain amount of time, before it's deleted, or there
# can be a certain amount of total roots kept. See the example configuration here:
# <https://github.com/nix-community/impermanence> which demonstrates keepping 30 days
# worth of old roots.
wipeScript = devicePath: subvolumes: '' wipeScript = devicePath: subvolumes: ''
# Mount the BTRFS device root to a temporary mount point # Mount the BTRFS device root to a temporary mount point
echo "Mounting BTRFS root from ${devicePath} to /mnt" echo "Mounting BTRFS root from ${devicePath} to /mnt"