From efeb877394825ffb1e69fb62288c698f18444450 Mon Sep 17 00:00:00 2001
From: prescientmoon <git@moonythm.dev>
Date: Wed, 28 Aug 2024 00:52:27 +0200
Subject: [PATCH] New partition rollback mechanism!

---
 hosts/nixos/calypso/filesystems/default.nix    |  2 +-
 hosts/nixos/calypso/filesystems/partitions.nix | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/hosts/nixos/calypso/filesystems/default.nix b/hosts/nixos/calypso/filesystems/default.nix
index 177540d..b20f013 100644
--- a/hosts/nixos/calypso/filesystems/default.nix
+++ b/hosts/nixos/calypso/filesystems/default.nix
@@ -60,7 +60,7 @@
         btrfs subvolume delete /mnt/root
 
       echo "restoring blank /root subvolume..."
-      btrfs subvolume snapshot /mnt/root-blank /mnt/root
+      btrfs subvolume snapshot /mnt/blank /mnt/root
 
       # Once we're done rolling back to a blank snapshot,
       # we can unmount /mnt and continue on the boot process.
diff --git a/hosts/nixos/calypso/filesystems/partitions.nix b/hosts/nixos/calypso/filesystems/partitions.nix
index fa00c41..590180c 100644
--- a/hosts/nixos/calypso/filesystems/partitions.nix
+++ b/hosts/nixos/calypso/filesystems/partitions.nix
@@ -43,6 +43,16 @@
                   ];
                 };
                 # }}}
+                # {{{ /blank
+                "blank" = {
+                  mountpoint = "/blank";
+                  # should we reuse the `root` options here?
+                  mountOptions = [
+                    "compress=zstd"
+                    "noatime"
+                  ];
+                };
+                # }}}
                 # {{{ /swap
                 "swap" = {
                   mountpoint = "/.swapvol";