MPD: Difference between revisions

Tejing (talk | contribs)
No edit summary
Jasi (talk | contribs)
NixOS installation: correction: startWhenNeeded is no longer under the network attribute.
 
Line 3: Line 3:
== Home-manager Installation ==
== Home-manager Installation ==
Home-manager has a module for MPD which runs it as a systemd user service, giving it easier access to your user's sound server. In most cases no specific audio output configuration is necessary:
Home-manager has a module for MPD which runs it as a systemd user service, giving it easier access to your user's sound server. In most cases no specific audio output configuration is necessary:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">services.mpd = {
services.mpd = {
   enable = true;
   enable = true;
   musicDirectory = "/path/to/music";
   musicDirectory = "/path/to/music";
Line 10: Line 9:
   network.listenAddress = "any"; # if you want to allow non-localhost connections
   network.listenAddress = "any"; # if you want to allow non-localhost connections
   network.startWhenNeeded = true; # systemd feature: only start MPD service upon connection to its socket
   network.startWhenNeeded = true; # systemd feature: only start MPD service upon connection to its socket
};
};</syntaxhighlight>
</syntaxhighlight>




Line 27: Line 25:
   # Optional:
   # Optional:
   network.listenAddress = "any"; # if you want to allow non-localhost connections
   network.listenAddress = "any"; # if you want to allow non-localhost connections
   network.startWhenNeeded = true; # systemd feature: only start MPD service upon connection to its socket
   startWhenNeeded = true; # systemd feature: only start MPD service upon connection to its socket
};
};
</syntaxhighlight>
</syntaxhighlight>