chore: move mpd, also add some things and reorder

This commit is contained in:
Ahwx 2025-07-15 11:32:53 +02:00
parent 793937d34d
commit 8ff40790f2

View file

@ -1,31 +0,0 @@
{
username,
config,
pkgs,
...
}:
{
services.mpd = {
enable = true;
musicDirectory = "/home/liv/Music";
extraConfig = ''
audio_output {
type "pipewire"
name "pipewire"
}
'';
user = "${username}"; # PipeWire requires this as it runs as the normal user and mpd normally runs as a system user.
# Optional:
# network.listenAddress = "any"; # if you want to allow non-localhost connections
};
systemd.services.mpd.environment = {
# see: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
XDG_RUNTIME_DIR = "/run/user/${toString config.users.users.${username}.uid}"; # User-id must match above user. MPD will look inside this directory for the PipeWire socket.
};
environment.systemPackages = with pkgs; [
mpdris2
ncmpcpp
];
}