Disable mpd output for storage-ng
This commit is contained in:
parent
93fcc1588d
commit
488f292b03
41
lib/mpd.nix
41
lib/mpd.nix
|
@ -1,28 +1,29 @@
|
|||
{ 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 "storage-ng.hq.c3d2.de"
|
||||
}
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
hostMpd = if config.networking.hostName == "storage-ng" then {
|
||||
musicDirectory = "/mnt/cephfs/c3d2/rpool/Music";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
name "null"
|
||||
type "null"
|
||||
}
|
||||
'';
|
||||
} else {
|
||||
dbFile = null;
|
||||
musicDirectory = "/mnt/storage/Music";
|
||||
extraConfig = ''
|
||||
database {
|
||||
plugin "proxy"
|
||||
host "storage-ng.hq.c3d2.de"
|
||||
}
|
||||
'';
|
||||
};
|
||||
in {
|
||||
services.mpd = (hostMpd // {
|
||||
enable=true;
|
||||
enable = true;
|
||||
network.listenAddress = "any";
|
||||
});
|
||||
|
||||
networking.firewall.allowedTCPPorts =
|
||||
[ config.services.mpd.network.port ];
|
||||
networking.firewall.allowedTCPPorts = [ config.services.mpd.network.port ];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue