nixos/mpd: allow autostart when listening for unix socket

This commit is contained in:
Daniel Albert 2020-03-07 19:34:04 +01:00
parent 93745d243b
commit 7a2e940a3f

View file

@ -148,7 +148,9 @@ in {
description = "Music Player Daemon Socket";
wantedBy = [ "sockets.target" ];
listenStreams = [
"${optionalString (cfg.network.listenAddress != "any") "${cfg.network.listenAddress}:"}${toString cfg.network.port}"
(if pkgs.lib.hasPrefix "/" cfg.network.listenAddress
then cfg.network.listenAddress
else "${optionalString (cfg.network.listenAddress != "any") "${cfg.network.listenAddress}:"}${toString cfg.network.port}")
];
socketConfig = {
Backlog = 5;