{ config, lib, pkgs, ... }: { options = { homeconfig.mpd.enable = lib.options.mkOption { type = lib.types.bool; default = false; }; }; config = lib.mkIf config.homeconfig.mpd.enable { services.mpd = { enable = true; network.startWhenNeeded = true; network.port = 6600; network.listenAddress = "127.0.0.1"; musicDirectory = "/home/nathan/Music"; extraConfig = '' audio_output { type "pipewire" name "Audio1" } audio_output { type "fifo" name "visualizer" path "/tmp/mpd.fifo" format "44100:16:1" } ''; }; services.mpdris2 = { enable = true; mpd.host = "127.0.0.1"; mpd.port = 6600; package = pkgs.mpdris2; mpd.musicDirectory = "/home/nathan/Music"; notifications = true; }; }; }