From d4c9a79d9a14c398a85fd37a6183667102748969 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 1 Oct 2023 21:15:57 +0000 Subject: sys/mbp.nix: fix erasing / Just deleting the "boot" subvolume stopped working, because deleting a subvolume isn't recursive with respect to child subvolumes, and systemd started creating more subvolumes. The fix is to add another subvolume under /persist for /var/lib/portables, and add another special bind-mounted subvolume for /tmp, so it's not actually below /, and have that also be deleted on boot. I've also taken the opportunity to rename "boot", because it was easy to confuse with /boot. --- sys/mbp.nix | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/mbp.nix b/sys/mbp.nix index 1c595142c65a..202933a9553d 100644 --- a/sys/mbp.nix +++ b/sys/mbp.nix @@ -16,8 +16,10 @@ boot.initrd.postDeviceCommands = '' mkdir /mnt mount /dev/mapper/root /mnt - btrfs subvolume delete /mnt/boot - btrfs subvolume create /mnt/boot + for subvol in @ tmp; do + btrfs subvolume delete "/mnt/$subvol" + btrfs subvolume create "/mnt/$subvol" + done umount /mnt ''; @@ -38,7 +40,13 @@ fileSystems."/" = { device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926"; fsType = "btrfs"; - options = [ "subvol=boot" ]; + options = [ "subvol=@" ]; + }; + + fileSystems."/tmp" = { + device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926"; + fsType = "btrfs"; + options = [ "subvol=tmp" ]; }; fileSystems."/home" = { @@ -77,6 +85,12 @@ options = [ "subvol=persist/safe/var/lib/machines" ]; }; + fileSystems."/var/lib/portables" = { + device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926"; + fsType = "btrfs"; + options = [ "subvol=persist/safe/var/lib/portables" ]; + }; + networking.hostName = "mbp"; users.users.qyliss.hashedPassword = "$y$j9T$qdvgrHPyvZpqjUQXuagxD1$dq5yygUTVhVqpgG9.zWaihmtED437Cl.fllqJBEWSo4"; -- cgit 1.4.1