1 { lib, pkgs, config, ... }:
3 options.myServices.mpd.enable = lib.mkEnableOption "enable MPD";
4 config = lib.mkIf config.myServices.mpd.enable {
8 text = config.myEnv.mpd.password;
15 password "${config.myEnv.mpd.password}@read,add,control,admin"
19 networking.firewall.allowedTCPPorts = [ 6600 ];
20 users.users.mpd.extraGroups = [ "wwwrun" "keys" ];
21 systemd.services.mpd.serviceConfig.RuntimeDirectory = "mpd";
22 services.filesWatcher.mpd = {
24 paths = [ config.secrets.fullPaths."mpd-config" ];
29 network.listenAddress = "any";
30 musicDirectory = config.myEnv.mpd.folder;
32 include "${config.secrets.fullPaths."mpd-config"}"
42 bind_to_address "/run/mpd/ogg.sock"
50 bind_to_address "/run/mpd/mp3.sock"