hosts/ni/networking/setup: add DNS option for NetworkManager setup

This commit is contained in:
Gabriel Arazas 2024-01-16 14:58:18 +08:00
parent b95dd0f59a
commit 25149e2f38
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -115,10 +115,16 @@ in
networking.usePredictableInterfaceNames = true;
# Enable and configure NetworkManager.
networking.networkmanager = {
enable = true;
dhcp = lib.mkIf (config.networking.dhcpcd.enable) "dhcpcd";
};
networking.networkmanager = lib.mkMerge [
{
enable = true;
dhcp = lib.mkIf (config.networking.dhcpcd.enable) "dhcpcd";
}
(lib.mkIf config.services.resolved.enable {
dns = "systemd-resolved";
})
];
# We'll configure individual network interfaces to use DHCP since it can
# fail wait-online-interface.service.