summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/core/impermanence.nix10
1 files changed, 1 insertions, 9 deletions
diff --git a/modules/core/impermanence.nix b/modules/core/impermanence.nix
index c5f3009..8540ed2 100644
--- a/modules/core/impermanence.nix
+++ b/modules/core/impermanence.nix
@@ -4,11 +4,6 @@
boot.initrd.postDeviceCommands = lib.mkAfter ''
mkdir /btrfs_tmp
mount /dev/root_vg/root /btrfs_tmp
- 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")
- mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
- fi
delete_subvolume_recursively() {
IFS=$'\n'
@@ -18,9 +13,7 @@
btrfs subvolume delete "$1"
}
- for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
- delete_subvolume_recursively "$i"
- done
+ delete_subvolume_recursively "/btrfs_tmp/root"
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
@@ -30,7 +23,6 @@
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [
- "/etc/nixos"
"/var/log"
"/var/lib/bluetooth"
"/var/lib/nixos"