anchor.diff:    # TODO: Fix udev so the symlinks are unneeded in /dev/disks
     simpleProvided = makeInstallerTest "simpleProvided" {
       createPartitions = ''
  -      my $UUID = "\$(blkid -s UUID -o value /dev/vda2)";
  -      $machine->succeed(
  -        "sgdisk -Z /dev/vda",
  -        "sgdisk -n 1:0:+1M -n 2:0:+100M -n 3:0:+1G -N 4 -t 1:ef02 -t 2:8300 -t 3:8200 -t 4:8300 -c 2:boot -c 4:root /dev/vda",
  -        "mkswap /dev/vda3 -L swap",
  -        "swapon -L swap",
  -        "mkfs.ext4 -L boot /dev/vda2",
  -        "mkfs.ext4 -L root /dev/vda4",
  -      );
  -      $machine->execute("ln -s ../../vda2 /dev/disk/by-uuid/$UUID");
  -      $machine->execute("ln -s ../../vda4 /dev/disk/by-label/root");
  -      $machine->succeed(
  -        "mount /dev/disk/by-label/root /mnt",
  -        "mkdir /mnt/boot",
  -        "mount /dev/disk/by-uuid/$UUID /mnt/boot"
  -      );
  +      uuid = "$(blkid -s UUID -o value /dev/vda2)"
  +      machine.succeed(
  +          "sgdisk -Z /dev/vda",
  +          "sgdisk -n 1:0:+1M -n 2:0:+100M -n 3:0:+1G -N 4 -t 1:ef02 -t 2:8300 "
  +          + "-t 3:8200 -t 4:8300 -c 2:boot -c 4:root /dev/vda",
  +          "mkswap /dev/vda3 -L swap",
  +          "swapon -L swap",
  +          "mkfs.ext4 -L boot /dev/vda2",
  +          "mkfs.ext4 -L root /dev/vda4",
  +      )
  +      machine.execute(f"ln -s ../../vda2 /dev/disk/by-uuid/{uuid}")
  +      machine.execute("ln -s ../../vda4 /dev/disk/by-label/root")
  +      machine.succeed(
  +          "mount /dev/disk/by-label/root /mnt",
  +          "mkdir /mnt/boot",
  +          f"mount /dev/disk/by-uuid/{uuid} /mnt/boot",
  +      )
       '';
       grubIdentifier = "provided";
     };
  
positive.code:       };
      };
  
      makeLuksRootTest = name: luksFormatOpts: makeInstallerTest name
        { createPartitions = ''
            $machine->succeed(
              "flock /dev/vda parted --script /dev/vda -- mklabel msdos"
              . " mkpart primary ext2 1M 50MB" # /boot
              . " mkpart primary linux-swap 50M 1024M"
              . " mkpart primary 1024M -1s", # LUKS
              "udevadm settle",
              "mkswap /dev/vda2 -L swap",
              "swapon -L swap",
  
negative.code:             "mkfs.ext3 -L boot /dev/vda1",
              "mkdir -p /mnt/boot",
              "mount LABEL=boot /mnt/boot",
          )
        '';
        extraConfig = ''
          boot.kernelParams = lib.mkAfter [ "console=tty0" ];
        '';
        enableOCR = true;
        preBootCommands = ''
          machine.start()
          machine.wait_for_text("Passphrase for")
          machine.send_chars("supersecret\n")
        '';
      };
  
    # The (almost) simplest partitioning scheme: a swap partition and
    # one big filesystem partition.
    simple-test-config = {
      createPartitions = ''
        machine.succeed(
            "flock /dev/vda parted --script /dev/vda -- mklabel msdos"
            + " mkpart primary linux-swap 1M 1024M"
            + " mkpart primary ext2 1024M -1s",
            "udevadm settle",
            "mkswap /dev/vda1 -L swap",
            "swapon -L swap",
            "mkfs.ext3 -L nixos /dev/vda2",
            "mount LABEL=nixos /mnt",
        )
      '';
    };
  
    simple-uefi-grub-config = {
      createPartitions = ''
        machine.succeed(
            "flock /dev/vda parted --script /dev/vda -- mklabel gpt"
            + " mkpart ESP fat32 1M 50MiB"  # /boot
            + " set 1 boot on"
            + " mkpart primary linux-swap 50MiB 1024MiB"
            + " mkpart primary ext2 1024MiB -1MiB",  # /
            "udevadm settle",
            "mkswap /dev/vda2 -L swap",
            "swapon -L swap",
            "mkfs.ext3 -L nixos /dev/vda3",
            "mount LABEL=nixos /mnt",
            "mkfs.vfat -n BOOT /dev/vda1",
            "mkdir -p /mnt/boot",
            "mount LABEL=BOOT /mnt/boot",
        )
      '';
      bootLoader = "grub";
      grubUseEfi = true;
    };
  
    clone-test-extraconfig = {
      extraConfig = ''
        environment.systemPackages = [ pkgs.grub2 ];
        boot.loader.grub.configurationName = "Home";
        nesting.clone = [ {
          boot.loader.grub.configurationName = lib.mkForce "Work";
  
          environment.etc = {
            "gitconfig".text = "
              [core]
                gitproxy = none for work.com
                ";
          };
        } ];
      '';
      testCloneConfig = true;
    };
  
  
  