treewide: fix fallout of ip-up deprecation

See #18319 for details. Starting network-online.target manually does not
work as it hangs indefinitely.

Additionally, don't treat avahi and dhcpcd special and sync their systemd units
with the respective upstream suggestion.
This commit is contained in:
Franz Pletz
2016-09-11 08:13:04 +02:00
parent 3d479813f5
commit c58654e2b7
5 changed files with 4 additions and 28 deletions
@@ -7,10 +7,6 @@ let
cfg = config.services.avahi;
# We must escape interfaces due to the systemd interpretation
subsystemDevice = interface:
"sys-subsystem-net-devices-${utils.escapeSystemdPath interface}.device";
avahiDaemonConf = with cfg; pkgs.writeText "avahi-daemon.conf" ''
[server]
${# Users can set `networking.hostName' to the empty string, when getting
@@ -180,14 +176,8 @@ in
environment.systemPackages = [ pkgs.avahi ];
systemd.services.avahi-daemon =
let
deps = optionals (cfg.interfaces!=null) (map subsystemDevice cfg.interfaces);
in
{ description = "Avahi daemon";
wantedBy = [ "ip-up.target" ];
bindsTo = deps;
after = deps;
before = [ "ip-up.target" ];
wantedBy = [ "multi-user.target" ];
# Receive restart event after resume
partOf = [ "post-resume.target" ];