···1212follows:
13131414<programlisting>
1515-networking.interfaces.eth0.ip4 = [ { address = "192.168.1.2"; prefixLength = 24; } ];
1515+networking.interfaces.eth0.ipv4.addresses = [ { address = "192.168.1.2"; prefixLength = 24; } ];
1616</programlisting>
17171818Typically you’ll also want to set a default gateway and set of name
···261261 </listitem>
262262 <listitem>
263263 <para>
264264- The option <option>services.xserver.desktopManager.default</option> is now <literal>none</literal> by default.
265265- An assertion failure is thrown if WM's and DM's default are <literal>none</literal>.
266266- To explicitly run a plain X session without and DM or WM, the newly introduced option <option>services.xserver.plainX</option>
267267- must be set to true.
264264+ In the module <option>networking.interfaces.<name></option> the
265265+ following options have been removed:
266266+ <itemizedlist>
267267+ <listitem>
268268+ <para><option>ipAddress</option></para>
269269+ </listitem>
270270+ <listitem>
271271+ <para><option>ipv6Address</option></para>
272272+ </listitem>
273273+ <listitem>
274274+ <para><option>prefixLength</option></para>
275275+ </listitem>
276276+ <listitem>
277277+ <para><option>ipv6PrefixLength</option></para>
278278+ </listitem>
279279+ <listitem>
280280+ <para><option>subnetMask</option></para>
281281+ </listitem>
282282+ </itemizedlist>
283283+ To assign static addresses to an interface the options
284284+ <option>ipv4.addresses</option> and <option>ipv6.addresses</option>
285285+ should be used instead.
286286+ The options <option>ip4</option> and <option>ip6</option> have been
287287+ renamed to <option>ipv4.addresses</option> <option>ipv6.addresses</option>
288288+ respectively.
289289+ The new options <option>ipv4.routes</option> and <option>ipv6.routes</option>
290290+ have been added to set up static routing.
291291+ </para>
292292+ </listitem>
293293+ <listitem>
294294+ <para>
295295+ The option <option>services.xserver.desktopManager.default</option> is now
296296+ <literal>none</literal> by default. An assertion failure is thrown if WM's
297297+ and DM's default are <literal>none</literal>.
298298+ To explicitly run a plain X session without and DM or WM, the newly
299299+ introduced option <option>services.xserver.plainX</option> must be set to true.
268300 </para>
269301 </listitem>
270302 <listitem>
+2-2
nixos/lib/build-vms.nix
···5151 let
5252 interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255);
5353 interfaces = flip map interfacesNumbered ({ fst, snd }:
5454- nameValuePair "eth${toString snd}" { ip4 =
5454+ nameValuePair "eth${toString snd}" { ipv4.addresses =
5555 [ { address = "192.168.${toString fst}.${toString m.snd}";
5656 prefixLength = 24;
5757 } ];
···6464 networking.interfaces = listToAttrs interfaces;
65656666 networking.primaryIPAddress =
6767- optionalString (interfaces != []) (head (head interfaces).value.ip4).address;
6767+ optionalString (interfaces != []) (head (head interfaces).value.ipv4.addresses).address;
68686969 # Put the IP addresses of all VMs in this machine's
7070 # /etc/hosts file. If a machine has multiple
+1-1
nixos/modules/services/networking/dhcpcd.nix
···1616 # Don't start dhcpcd on explicitly configured interfaces or on
1717 # interfaces that are part of a bridge, bond or sit device.
1818 ignoredInterfaces =
1919- map (i: i.name) (filter (i: if i.useDHCP != null then !i.useDHCP else i.ip4 != [ ] || i.ipAddress != null) interfaces)
1919+ map (i: i.name) (filter (i: if i.useDHCP != null then !i.useDHCP else i.ipv4.addresses != [ ]) interfaces)
2020 ++ mapAttrsToList (i: _: i) config.networking.sits
2121 ++ concatLists (attrValues (mapAttrs (n: v: v.interfaces) config.networking.bridges))
2222 ++ concatLists (attrValues (mapAttrs (n: v: v.interfaces) config.networking.vswitches))