anchor.diff:  
           preStart =
             ''
  +            # Clean up existing machined registration.
  +            machinectl terminate "$INSTANCE" 2> /dev/null || true
  +
               mkdir -p -m 0755 $root/var/lib
   
               # Create a named pipe to get a signal when the container
  
positive.code: 
          preStop =
            ''
              machinectl poweroff "$INSTANCE"
            '';
  
          restartIfChanged = false;
          #reloadIfChanged = true; # FIXME
  
          serviceConfig.ExecReload = pkgs.writeScript "reload-container"
            ''
              #! ${pkgs.stdenv.shell} -e
              SYSTEM_PATH=/nix/var/nix/profiles/system
              echo $SYSTEM_PATH/bin/switch-to-configuration test | \
                ${pkgs.socat}/bin/socat unix:$root/var/lib/run-command.socket -
            '';
  
          serviceConfig.SyslogIdentifier = "container %i";
  
          serviceConfig.EnvironmentFile = "-/etc/containers/%i.conf";
        };
  
      # Generate a configuration file in /etc/containers for each
  
negative.code:               fi
              ''}
  
              EXIT_ON_REBOOT=1 \
              exec ${config.systemd.package}/bin/systemd-nspawn \
                --keep-unit \
                -M "$INSTANCE" -D "$root" $extraFlags \
  