29 lines
537 B
Nix
29 lines
537 B
Nix
|
{ config, pkgs, lib, ... }:
|
||
|
|
||
|
let
|
||
|
hostMpd = if config.networking.hostName == "storage-ng" then
|
||
|
{
|
||
|
musicDirectory = "/mnt/cephfs/c3d2/rpool/Music";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
dbFile = null;
|
||
|
musicDirectory = "/mnt/storage/Music";
|
||
|
extraConfig = ''
|
||
|
database {
|
||
|
plugin "proxy"
|
||
|
host "172.22.99.20"
|
||
|
}
|
||
|
'';
|
||
|
};
|
||
|
in
|
||
|
{
|
||
|
services.mpd = (hostMpd // {
|
||
|
enable=true;
|
||
|
network.listenAddress = "any";
|
||
|
});
|
||
|
|
||
|
networking.firewall.allowedTCPPorts =
|
||
|
[ config.mpd.network.port ];
|
||
|
}
|