anchor.diff:    # disk, and then reboot from the hard disk.  It's parameterized with
     # a test script fragment `createPartitions', which must create
     # partitions and filesystems.
  -  testScriptFun = { createPartitions, testChannel, grubVersion, grubDevice, grubIdentifier }:
  +  testScriptFun = { createPartitions, testChannel, grubVersion, grubDevice
  +                  , grubIdentifier, extraConfig
  +                  }:
       let
         # FIXME: OVMF doesn't boot from virtio http://www.mail-archive.com/edk2-devel@lists.sourceforge.net/msg01501.html
         iface = if grubVersion == 1 then "scsi" else "virtio";
  
positive.code:       $machine = createMachine({ ${hdFlags} qemuFlags => "${qemuFlags}" });
        $machine->waitForUnit("multi-user.target");
        $machine->copyFileFromHost(
            "${ makeConfig { inherit testChannel grubVersion grubDevice grubIdentifier; readOnly = false; forceGrubReinstallCount = 2; } }",
            "/etc/nixos/configuration.nix");
        $machine->succeed("nixos-rebuild boot >&2");
        $machine->shutdown;
  
negative.code: 
  
    makeInstallerTest = name:
      { createPartitions, testChannel ? false, grubVersion ? 2
      , grubDevice ? "/dev/vda", grubIdentifier ? "uuid", extraConfig ? ""
      }:
      makeTest {
        inherit iso;
        name = "installer-" + name;
        nodes = if testChannel then { inherit webserver; } else { };
        testScript = testScriptFun {
          inherit createPartitions testChannel grubVersion grubDevice
                  grubIdentifier extraConfig;
        };
      };
  
  