diff options
author | Franck Cuny <franck@fcuny.net> | 2022-02-16 17:45:31 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-02-16 17:45:31 -0800 |
commit | ed4b696d0dcfc012444ebd7e8c9423f0f0f1c1eb (patch) | |
tree | f793ba2f9b3542d970bf9c53733e53e33faadbb3 | |
parent | xdg: use actual home directory path (diff) | |
download | world-ed4b696d0dcfc012444ebd7e8c9423f0f0f1c1eb.tar.gz |
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.
Diffstat (limited to '')
-rw-r--r-- | users/fcuny/desktop/media.nix | 20 |
1 files changed, 19 insertions, 1 deletions
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" + } + ''; }; } |