nixos/avahi-daemon: add dependency to ensure /run/avahi-daemon is created before socket activation (#417635)

This commit is contained in:
Yang, Bo 2025-07-02 04:03:14 -07:00 committed by GitHub
parent ddf85d4e24
commit 3f377cfde8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -323,6 +323,11 @@ in
description = "Avahi mDNS/DNS-SD Stack Activation Socket";
listenStreams = [ "/run/avahi-daemon/socket" ];
wantedBy = [ "sockets.target" ];
after = [
# Ensure that `/run/avahi-daemon` owned by `avahi` is created by `systemd.tmpfiles.rules` before the `avahi-daemon.socket`,
# otherwise `avahi-daemon.socket` will automatically create it owned by `root`, which will cause `avahi-daemon.service` to fail.
"systemd-tmpfiles-setup.service"
];
};
systemd.tmpfiles.rules = [ "d /run/avahi-daemon - avahi avahi -" ];