1 { lib, pkgs, config, myconfig, ... }:
3 options.myServices.mpd.enable = lib.mkEnableOption "enable MPD";
4 config = lib.mkIf config.myServices.mpd.enable {
5 services.duplyBackup.profiles.mpd = {
6 rootDir = "/var/lib/mpd";
12 text = myconfig.env.mpd.password;
20 password "${myconfig.env.mpd.password}@read,add,control,admin"
24 networking.firewall.allowedTCPPorts = [ 6600 ];
25 users.users.mpd.extraGroups = [ "wwwrun" "keys" ];
26 systemd.services.mpd.serviceConfig.RuntimeDirectory = "mpd";
27 services.filesWatcher.mpd = {
29 paths = [ "/var/secrets/mpd-config" ];
34 network.listenAddress = "any";
35 musicDirectory = myconfig.env.mpd.folder;
37 include "/var/secrets/mpd-config"
47 bind_to_address "/run/mpd/ogg.sock"
55 bind_to_address "/run/mpd/mp3.sock"