Skip to content

Commit

Permalink
nixos/mpd: allow autostart when listening for unix socket
Browse files Browse the repository at this point in the history
  • Loading branch information
esclear committed Mar 7, 2020
1 parent 93745d2 commit 7a2e940
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nixos/modules/services/audio/mpd.nix
Expand Up @@ -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;
Expand Down

0 comments on commit 7a2e940

Please sign in to comment.