diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2024-10-10 11:35:30 +0530 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-10-10 11:35:30 +0530 |
| commit | 9cb4903aa9c90b7b0f88fe1f954e7474247c06d2 (patch) | |
| tree | 4e838b4f3bf89103b198544aa415606df6d97ebe /modules | |
| parent | 1f34404b653877e010332ae31de8ce07c541ef59 (diff) | |
(update): Install script, update btrfs erase script.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/core/impermanence.nix | 10 |
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" |
