From ed4b696d0dcfc012444ebd7e8c9423f0f0f1c1eb Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 16 Feb 2022 17:45:31 -0800 Subject: mpd: add configuration to the module itself When running `mpd` from nixos, it ignores the configuration under `$HOME/.config/mpd/config`. Instead, we need to pass the proper configuration as `extraConfig` to the module itself. --- users/fcuny/desktop/media.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'users') diff --git a/users/fcuny/desktop/media.nix b/users/fcuny/desktop/media.nix index d4f4cce..9f5b93b 100644 --- a/users/fcuny/desktop/media.nix +++ b/users/fcuny/desktop/media.nix @@ -7,10 +7,28 @@ pkgs.pavucontrol ]; - xdg.configFile."mpd/mpd.conf".source = ../configs/mpd/mpd.conf; xdg.configFile."ncmpcpp/config".source = ../configs/ncmpcpp/config; services.mpd = { enable = true; + musicDirectory = config.xdg.userDirs.music; + extraConfig = '' + auto_update "yes" + filesystem_charset "UTF-8" + zeroconf_enabled "no" + input { + plugin "curl" + } + audio_output { + type "pipewire" + name "PipeWire Sound Server" + } + audio_output { + type "fifo" + name "visualizer" + path "/tmp/mpd.fifo" + format "44100:16:2" + } + ''; }; } -- cgit 1.4.1