mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 08:08:45 +08:00
system.fileSystems.rollingRootFs: make old rootfs readonly
This commit is contained in:
parent
78b27d3ae5
commit
e832412f3b
@ -237,6 +237,7 @@ inputs:
|
||||
if [ -f /mnt${path}/current/.timestamp ]
|
||||
then
|
||||
mv /mnt${path}/current /mnt${path}/$(cat /mnt${path}/current/.timestamp)
|
||||
btrfs property set -ts /mnt${path}/$(cat /mnt${path}/current/.timestamp) ro true
|
||||
fi
|
||||
btrfs subvolume create /mnt${path}/current
|
||||
echo $(date '+%Y%m%d%H%M%S') > /mnt${path}/current/.timestamp
|
||||
|
Loading…
Reference in New Issue
Block a user