{ lib, ... }:

with lib;

{
  config = {
    networking = {
      networkmanager = {
        enable = true;
        dhcp = "internal";
        dns = mkForce "dnsmasq";
        extraConfig = ''
          [connectivity]
          uri=https://online.yggdrasil.li
        '';
      };

      dhcpcd.enable = false;
    };

    systemd.services."NetworkManager-wait-online".enable = false;
    systemd.services."systemd-networkd-wait-online".enable = mkForce false;

    services.resolved.enable = false;

    environment.noXlibs = false;
  };
}