anchor.diff:    cfg = config.services.clamav;
     pkg = pkgs.clamav;
   
  -  clamdConfigFile = pkgs.writeText "clamd.conf" ''
  -    DatabaseDirectory ${stateDir}
  -    LocalSocket ${runDir}/clamd.ctl
  -    PidFile ${runDir}/clamd.pid
  -    TemporaryDirectory /tmp
  -    User clamav
  -    Foreground yes
  +  toKeyValue = generators.toKeyValue {
  +    mkKeyValue = generators.mkKeyValueDefault {} " ";
  +    listsAsDuplicateKeys = true;
  +  };
   
  -    ${cfg.daemon.extraConfig}
  -  '';
  -
  -  freshclamConfigFile = pkgs.writeText "freshclam.conf" ''
  -    DatabaseDirectory ${stateDir}
  -    Foreground yes
  -    Checks ${toString cfg.updater.frequency}
  -
  -    ${cfg.updater.extraConfig}
  -
  -    DatabaseMirror database.clamav.net
  -  '';
  +  clamdConfigFile = pkgs.writeText "clamd.conf" (toKeyValue cfg.daemon.settings);
  +  freshclamConfigFile = pkgs.writeText "freshclam.conf" (toKeyValue cfg.updater.settings);
   in
   {
     imports = [
  -    (mkRenamedOptionModule [ "services" "clamav" "updater" "config" ] [ "services" "clamav" "updater" "extraConfig" ])
  +    (mkRemovedOptionModule [ "services" "clamav" "updater" "config" ] "Use services.clamav.updater.settings instead.")
  +    (mkRemovedOptionModule [ "services" "clamav" "updater" "extraConfig" ] "Use services.clamav.updater.settings instead.")
  +    (mkRemovedOptionModule [ "services" "clamav" "daemon" "extraConfig" ] "Use services.clamav.daemon.settings instead.")
     ];
   
     options = {
  
positive.code: 
      users.groups.${clamavGroup} =
        { gid = config.ids.gids.clamav; };
  
      environment.etc."clamav/freshclam.conf".source = freshclamConfigFile;
      environment.etc."clamav/clamd.conf".source = clamdConfigFile;
  
negative.code:           '';
          };
  
          settings = mkOption {
            type = with types; attrsOf (oneOf [ bool int str (listOf str) ]);
            default = {};
            description = ''
              freshclam configuration. Refer to <link xlink:href="https://linux.die.net/man/5/freshclam.conf"/>,
              for details on supported values.
            '';
          };
        };
  