anchor.diff:  
   with lib;
   with pkgs;
  +with builtins;
   
   let
   
     cfg = config.libvirt.test;
  +
  +  backend =
  +    if match "^lxc\+?[^:]+://.*$" cfg.connectionURI != null then "lxc"
  +    else if match "^qemu\+?[^:]+://.*$" cfg.connectionURI != null then "qemu"
  +    else throw "Cannot derive libvirt backend type from URI ${cfg.connectionURI}";
   
     inherit (import ../../lib.nix) hexByteToInt mkMAC;
   
  
positive.code:           touch $build/log/std{out,err} $build/log/{${domList}}-console.log
            cp -t $build/libvirt "$src"/*
            for f in $build/libvirt/{dom,net}-*.xml; do substituteAllInPlace "$f"; done
            ${optionalString (cfg.backend == "lxc") ''mkdir $mnt/{root,run}-{${domList}} ''}
  
            # Let libvirt access paths inside the build directory and write to out dirs
            chmod a+x .
  
negative.code:       _module.args = { inherit pkgs; };
  
        libvirt.domain = {
          inherit backend;
          lxc = mkIf (backend == "lxc") {
            mappedUid = "@uid@";
            mappedGid = "@gid@";
            rootPath = "/@mnt@/root-${name}";
  