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.
wip/yesman
Benno Fünfstück 8 years ago
parent dab4f0a720
commit 796264a708
  1. 15
      nixos/modules/services/networking/avahi-daemon.nix

@ -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 ];

Loading…
Cancel
Save