nixos/network-interfaces: IPs must always be set

Previously, depending on the environment and the type of interface that
was created, the configured IPs of an interface wouldn't be applied on a
nixos-rebuild switch. It works after a reboot.

This patch ensures that the network-addresses service is started
either via the network-link service or if the networking target is
activated (i.e. on system activation).

Fixes #28474 #16230.
This commit is contained in:
Franz Pletz 2017-09-24 15:55:02 +02:00
parent 4429559aa1
commit 3a670daa98
No known key found for this signature in database
GPG key ID: 846FDED7792617B4

View file

@ -152,7 +152,11 @@ let
in in
nameValuePair "network-addresses-${i.name}" nameValuePair "network-addresses-${i.name}"
{ description = "Address configuration of ${i.name}"; { description = "Address configuration of ${i.name}";
wantedBy = [ "network-setup.service" ]; wantedBy = [
"network-setup.service"
"network-link-${i.name}.service"
"network.target"
];
# propagate stop and reload from network-setup # propagate stop and reload from network-setup
partOf = [ "network-setup.service" ]; partOf = [ "network-setup.service" ];
# order before network-setup because the routes that are configured # order before network-setup because the routes that are configured