anchor.diff:        $machine->waitForJob("tty1");
         $machine->waitForJob("rogue");
         $machine->waitForJob("nixos-manual");
  +
  +      # Test nix-env.
  +      $machine->mustSucceed("source /etc/profile");
  +      $machine->mustFail("hello");
  +      $machine->mustSucceed("nix-env -i hello");
  +      $machine->mustSucceed("hello") =~ /Hello, world/
  +          or die "bad `hello' output";
   
         # Partition the disk.
         $machine->mustSucceed(
  
positive.code:       $machine->mustSucceed("echo hello");
        $machine->shutdown;
      '';
  }
  
negative.code:           "mount LABEL=nixos /mnt",
        );
  
        # Create a NixOS configuration.
        $machine->mustSucceed(
            "mkdir -p /mnt/etc/nixos",
            "nixos-hardware-scan > /mnt/etc/nixos/hardware.nix",
        );
  
        my $cfg = $machine->mustSucceed("cat /mnt/etc/nixos/hardware.nix");
        print STDERR "Result of the hardware scan:$cfg\n";
  
        $machine->shutdown;
  
        # Now see if we can boot the installation.
  