nixos/avahi: use more upstream-like systemd units

The new units mirror the upstream systemd units as closely as possible.
I could not find a reason why the service would need to be restarted on
resuming from suspend, and the upstream units also do not contain such a
restriction, so I removed the `partOf = [ "post-resume.target"]`.
This fixes #19525.
This commit is contained in:
Benno Fünfstück 2016-10-15 22:30:50 +02:00
parent dab4f0a720
commit 796264a708

View File

@ -175,11 +175,20 @@ in
environment.systemPackages = [ pkgs.avahi ];
systemd.sockets.avahi-daemon =
{ description = "Avahi mDNS/DNS-SD Stack Activation Socket";
listenStreams = [ "/var/run/avahi-daemon/socket" ];
wantedBy = [ "sockets.target" ];
};
systemd.services.avahi-daemon =
{ description = "Avahi daemon";
{ description = "Avahi mDNS/DNS-SD Stack";
wantedBy = [ "multi-user.target" ];
# Receive restart event after resume
partOf = [ "post-resume.target" ];
requires = [ "avahi-daemon.socket" ];
serviceConfig."NotifyAccess" = "main";
serviceConfig."BusName" = "org.freedesktop.Avahi";
serviceConfig."Type" = "dbus";
path = [ pkgs.coreutils pkgs.avahi ];