Disable mpd output for storage-ng

This commit is contained in:
Ehmry - 2019-09-07 13:23:17 +02:00
parent 93fcc1588d
commit 488f292b03
1 changed files with 21 additions and 20 deletions

View File

@ -1,28 +1,29 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
hostMpd = if config.networking.hostName == "storage-ng" then hostMpd = if config.networking.hostName == "storage-ng" then {
{ musicDirectory = "/mnt/cephfs/c3d2/rpool/Music";
musicDirectory = "/mnt/cephfs/c3d2/rpool/Music"; extraConfig = ''
} audio_output {
else name "null"
{ type "null"
dbFile = null; }
musicDirectory = "/mnt/storage/Music"; '';
extraConfig = '' } else {
database { dbFile = null;
plugin "proxy" musicDirectory = "/mnt/storage/Music";
host "storage-ng.hq.c3d2.de" extraConfig = ''
} database {
''; plugin "proxy"
}; host "storage-ng.hq.c3d2.de"
in }
{ '';
};
in {
services.mpd = (hostMpd // { services.mpd = (hostMpd // {
enable=true; enable = true;
network.listenAddress = "any"; network.listenAddress = "any";
}); });
networking.firewall.allowedTCPPorts = networking.firewall.allowedTCPPorts = [ config.services.mpd.network.port ];
[ config.services.mpd.network.port ];
} }