anchor.diff:  let
     cfg = config.services.zabbixAgent;
   
  -  inherit (lib) mkDefault mkEnableOption mkIf mkOption;
  +  inherit (lib) mkDefault mkEnableOption mkIf mkMerge mkOption;
     inherit (lib) attrValues concatMapStringsSep literalExample optionalString types;
  +  inherit (lib.generators) toKeyValue;
   
     user = "zabbix-agent";
     group = "zabbix-agent";
  
positive.code:     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}
    '';
  
  in
  
  {
    # interface
  
    options = {
  
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;
          };
        };
  
      };
  