networking.defaultGateway

The default gateway. It can be left empty if it is auto-detected through DHCP. It can be specified as a string or an option set along with a network interface.

Type
null or ((submodule) or string convertible to it)
Default
null
Example
{
  address = "131.211.84.1";
  interface = "enp3s0";
  source = "131.211.84.2";
}
Declared
<nixpkgs/nixos/modules/tasks/network-interfaces.nix>