anchor.diff:      paths = attrValues cfg.modules;
     };
   
  -  configFile = pkgs.writeText "zabbix_agent.conf" ''
  -    LogType = console
  -    Server = ${cfg.server}
  -    ListenIP = ${cfg.listen.ip}
  -    ListenPort = ${toString cfg.listen.port}
  -    ${optionalString (cfg.modules != {}) "LoadModulePath = ${moduleEnv}/lib"}
  -    ${concatMapStringsSep "\n" (name: "LoadModule = ${name}") (builtins.attrNames cfg.modules)}
  -    ${cfg.extraConfig}
  -  '';
  +  configFile = pkgs.writeText "zabbix_agent.conf" (toKeyValue { listsAsDuplicateKeys = true; } cfg.settings);
   
   in
   
   {
  +  imports = [
  +    (lib.mkRemovedOptionModule [ "services" "zabbixAgent" "extraConfig" ] "Use services.zabbixAgent.settings instead.")
  +  ];
  +
     # interface
   
     options = {
  
positive.code:   # implementation
  
    config = mkIf cfg.enable {
  
      networking.firewall = mkIf cfg.openFirewall {
        allowedTCPPorts = [ cfg.listen.port ];
  
negative.code:         '';
        };
  
        settings = mkOption {
          type = with types; attrsOf (oneOf [ int str (listOf str) ]);
          default = {};
          description = ''
            Zabbix Agent configuration. Refer to
            <link xlink:href="https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_agentd"/>
            for details on supported values.
          '';
          example = {
            Hostname = "example.org";
            DebugLevel = 4;
          };
        };
  
      };
  