{ pkgs, ... }: { # MPD server services.mpd = { enable = true; user = "seraphim"; openFirewall = false; settings = { music_directory = "/mnt/giga/music"; bind_to_address = "any"; port = 6600; auto_update = "yes"; audio_output = [ { type = "pulse"; name = "PipeWire Output"; mixer_type = "hardware"; } ]; }; }; systemd.services.mpd.environment = { XDG_RUNTIME_DIR = "/run/user/1000"; }; # mpd-mpris is the MPRIS bridge for MPD — only useful when MPD is on, # so it lives in the same feature. Disable by removing this block. systemd.user.services.mpd-mpris = { description = "MPD MPRIS Service for Waybar"; wantedBy = [ "default.target" ]; after = [ "graphical-session.target" ]; serviceConfig = { ExecStart = "${pkgs.mpd-mpris}/bin/mpd-mpris -network tcp -host 127.0.0.1 -port 6600"; Restart = "on-failure"; }; }; }