From 9cb4903aa9c90b7b0f88fe1f954e7474247c06d2 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Thu, 10 Oct 2024 11:35:30 +0530 Subject: (update): Install script, update btrfs erase script. --- modules/core/impermanence.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'modules') 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" -- cgit v1.2.3