By default, NixOS uses DHCP (specifically, <command>dhcpcd</command>) to automatically configure network interfaces. However, you can configure an interface manually as follows:
Statically configured interfaces are set up by the systemd service <replaceable>interface-name</replaceable><literal>-cfg.service</literal>. The default gateway and name server configuration is performed by <literal>network-setup.service</literal>.
The default host name is <literal>nixos</literal>. Set it to the empty string (<literal>""</literal>) to allow the DHCP server to provide the host name.