anchor.diff:    }
   
     (mkIf cfg.ctrl-agent.enable {
  +    assertions = [{
  +        assertion = xor (cfg.ctrl-agent.settings == null) (cfg.ctrl-agent.configFile == null);
  +        message = "Either services.kea.ctrl-agent.settings or services.kea.ctrl-agent.configFile must be set to a non-null value.";
  +    }];
   
       environment.etc."kea/ctrl-agent.conf".source = ctrlAgentConfig;
   
  
positive.code:             '';
            };
  
            settings = mkOption {
              type = format.type;
              default = null;
  
negative.code: let
    cfg = config.services.kea;
  
    xor = x: y: (!x && y) || (x && !y);
    format = pkgs.formats.json {};
  
    chooseNotNull = x: y: if x != null then x else y;
  
    ctrlAgentConfig = chooseNotNull cfg.ctrl-agent.configFile (format.generate "kea-ctrl-agent.conf" {
      Control-agent = cfg.ctrl-agent.settings;
    });
  
    dhcp4Config = chooseNotNull cfg.dhcp4.configFile (format.generate "kea-dhcp4.conf" {
      Dhcp4 = cfg.dhcp4.settings;
    });
  
    dhcp6Config = chooseNotNull cfg.dhcp6.configFile (format.generate "kea-dhcp6.conf" {
      Dhcp6 = cfg.dhcp6.settings;
    });
  
    dhcpDdnsConfig = chooseNotNull cfg.dhcp-ddns.configFile (format.generate "kea-dhcp-ddns.conf" {
      DhcpDdns = cfg.dhcp-ddns.settings;
    });
  
    package = pkgs.kea;
  in
  