From 4e05093a1db61871926e7cfdc01f415270a105bc Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 5 Nov 2025 12:51:52 -0600 Subject: [PATCH] test: impermanence --- systems/ceres/config/filesystem.nix | 86 ++++++++++++++--------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/systems/ceres/config/filesystem.nix b/systems/ceres/config/filesystem.nix index 3ab6ff9..3a00f76 100755 --- a/systems/ceres/config/filesystem.nix +++ b/systems/ceres/config/filesystem.nix @@ -6,55 +6,53 @@ }: let inherit (flake.config.people) user0; + + rootDevice = "/dev/disk/by-uuid/8596aaba-338f-4f9d-ba9d-a63bcbc38523"; in { - fileSystems = - let - rootDevice = "/dev/disk/by-uuid/8596aaba-338f-4f9d-ba9d-a63bcbc38523"; - in - { - "/" = { - device = rootDevice; - fsType = "btrfs"; - options = [ - "subvol=root" - ]; - }; - - "/nix" = { - device = rootDevice; - fsType = "btrfs"; - options = [ - "subvol=nix" - ]; - }; - - "/persistent" = { - device = rootDevice; - fsType = "btrfs"; - neededForBoot = true; - options = [ - "subvol=persistent" - ]; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/7328-07C6"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - "/mnt/storage" = { - device = "/dev/disk/by-label/storage"; - fsType = "ext4"; - }; + fileSystems = { + "/" = { + device = rootDevice; + fsType = "btrfs"; + options = [ + "subvol=root" + ]; }; + + "/nix" = { + device = rootDevice; + fsType = "btrfs"; + options = [ + "subvol=nix" + ]; + }; + + "/persistent" = { + device = rootDevice; + fsType = "btrfs"; + neededForBoot = true; + options = [ + "subvol=persistent" + ]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/7328-07C6"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + "/mnt/storage" = { + device = "/dev/disk/by-label/storage"; + fsType = "ext4"; + }; + }; boot.initrd.postResumeCommands = lib.mkAfter '' mkdir /btrfs_tmp - mount -o subvolid=5 /dev/sda2 /btrfs_tmp + mount -o subvolid=5 ${rootDevice} /btrfs_tmp if [[ -e /btrfs_tmp/root ]]; then mkdir -p /btrfs_tmp/old_roots