anchor.diff:        description = "Virtual machine lock manager";
         serviceConfig.ExecStart = "@${pkgs.libvirt}/sbin/virtlockd virtlockd";
       };
  -
  -    users.extraGroups.libvirtd.gid = config.ids.gids.libvirtd;
  -
     };
   }
  
positive.code:     ${cfg.extraConfig}
    '';
  
  in
  
  {
    ###### interface
  
    options = {
  
      virtualisation.libvirtd.enable =
        mkOption {
          type = types.bool;
          default = false;
          description =
            ''
              This option enables libvirtd, a daemon that manages
              virtual machines. Users in the "libvirtd" group can interact with
              the daemon (e.g. to start or stop VMs) using the
              <command>virsh</command> command line tool, among others.
            '';
        };
  
      virtualisation.libvirtd.enableKVM =
        mkOption {
          type = types.bool;
          default = true;
          description =
            ''
              This option enables support for QEMU/KVM in libvirtd.
            '';
        };
  
      virtualisation.libvirtd.extraConfig =
        mkOption {
          type = types.lines;
          default = "";
          description =
            ''
              Extra contents appended to the libvirtd configuration file,
              libvirtd.conf.
            '';
        };
  
      virtualisation.libvirtd.extraOptions =
        mkOption {
          type = types.listOf types.str;
          default = [ ];
          example = [ "--verbose" ];
          description =
            ''
              Extra command line arguments passed to libvirtd on startup.
            '';
        };
  
      virtualisation.libvirtd.onShutdown =
        mkOption {
          type = types.enum ["shutdown" "suspend" ];
          default = "suspend";
          description =
            ''
              When shutting down / restarting the host what method should
              be used to gracefully halt the guests. Setting to "shutdown"
              will cause an ACPI shutdown of each guest. "suspend" will
              attempt to save the state of the guests ready to restore on boot.
            '';
        };
  
  
    };
  
  
negative.code: { config, lib, pkgs, ... }:
  
  with lib;
  