Переглянути джерело

chore(impermanence): refactor function parameters and update subvolume deletion

Zander Hawke 7 місяців тому
батько
коміт
a433ce0e67
1 змінених файлів з 5 додано та 6 видалено
  1. 5 6
      hosts/odin/system/impermanence.nix

+ 5 - 6
hosts/odin/system/impermanence.nix

@@ -1,8 +1,7 @@
-{
-  config,
-  inputs,
-  lib,
-  ...
+{ config
+, inputs
+, lib
+, ...
 }:
 {
   imports = [
@@ -57,7 +56,7 @@
 
     # Create or restore fresh root
     if [[ -e /mnt/@root-blank ]]; then
-      btrfs subvolume delete /mnt/@root || true
+      delete_subvolume_recursively /mnt/@root
       if ! btrfs subvolume snapshot /mnt/@root-blank /mnt/@root; then
         echo "Failed to snapshot @root-blank to @root"
         umount /mnt