2022-03-07 16:01:52 +01:00
|
|
|
{ config, ... }:
|
|
|
|
{
|
|
|
|
services.mpd = rec {
|
|
|
|
enable = true;
|
2022-11-11 21:23:25 +01:00
|
|
|
musicDirectory = config.xdg.userDirs.music;
|
2022-03-07 16:01:52 +01:00
|
|
|
playlistDirectory = "${musicDirectory}/playlists/MPD";
|
2024-06-25 19:02:20 +02:00
|
|
|
network.startWhenNeeded = true;
|
|
|
|
|
|
|
|
# TODO: make the path specific to the user unit
|
|
|
|
extraConfig = ''
|
|
|
|
audio_output {
|
|
|
|
type "fifo"
|
|
|
|
name "Visualizer feed"
|
|
|
|
path "/tmp/mpd.fifo"
|
|
|
|
format "44100:16:2"
|
|
|
|
}
|
|
|
|
|
|
|
|
audio_output {
|
2024-06-26 20:29:25 +02:00
|
|
|
type "pipewire"
|
|
|
|
name "PipeWire Sound Server"
|
2024-06-25 19:02:20 +02:00
|
|
|
}
|
|
|
|
'';
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
2024-08-02 17:45:34 +02:00
|
|
|
|
|
|
|
# TODO: disable auto_update and use systemd path to listen for changes
|
|
|
|
# TODO: upstream unix socket support to home-manager
|
2022-03-07 16:01:52 +01:00
|
|
|
}
|
|
|
|
|