Disable mpd output for storage-ng
This commit is contained in:
parent
93fcc1588d
commit
488f292b03
17
lib/mpd.nix
17
lib/mpd.nix
|
@ -1,12 +1,15 @@
|
||||||
{ 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 {
|
||||||
|
name "null"
|
||||||
|
type "null"
|
||||||
}
|
}
|
||||||
else
|
'';
|
||||||
{
|
} else {
|
||||||
dbFile = null;
|
dbFile = null;
|
||||||
musicDirectory = "/mnt/storage/Music";
|
musicDirectory = "/mnt/storage/Music";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
@ -16,13 +19,11 @@ let
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
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 ];
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user