anchor.diff:              ''
                 PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin
                 pushd $out
  -              tar -Szcf $diskImageBase.tar.gz $diskImageBase
  -              rm $out/$diskImageBase
  +              mv $diskImageBase disk.raw
  +              tar -Szcf $diskImageBase.tar.gz disk.raw
  +              rm $out/disk.raw
                 popd
               '';
             diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
  
positive.code: { config, pkgs, ... }:
  
  with pkgs.lib;
  
  {
    imports = [ ../profiles/headless.nix ../profiles/qemu-guest.nix ];
  
  
negative.code:             ''
                mkdir $out
                diskImage=$out/$diskImageBase
                truncate $diskImage --size ${diskSize}
                mv closure xchg/
              '';
  
  