Remove lib/mpd.nix, configure pulsebert directly
This commit is contained in:
parent
1f5a5272c4
commit
02e64a8f80
|
@ -13,7 +13,6 @@ in {
|
||||||
../../lib
|
../../lib
|
||||||
../../lib/admins.nix
|
../../lib/admins.nix
|
||||||
../../lib/hq.nix
|
../../lib/hq.nix
|
||||||
../../lib/mpd.nix
|
|
||||||
../../lib/yggdrasil.nix
|
../../lib/yggdrasil.nix
|
||||||
./mpdConsole.nix
|
./mpdConsole.nix
|
||||||
];
|
];
|
||||||
|
@ -92,16 +91,16 @@ in {
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
4713 # PulseAudio
|
4713 # PulseAudio
|
||||||
631 # cups
|
631 # cups
|
||||||
80 443 # Web/ympd
|
80
|
||||||
|
443 # Web/ympd
|
||||||
5000 # shairport
|
5000 # shairport
|
||||||
|
config.services.mpd.network.port
|
||||||
];
|
];
|
||||||
networking.firewall.allowedUDPPorts = [
|
networking.firewall.allowedUDPPorts = [ 631 ];
|
||||||
631
|
|
||||||
];
|
|
||||||
networking.firewall.extraCommands = ''
|
networking.firewall.extraCommands = ''
|
||||||
iptables -I INPUT -p udp --dport mdns -d 224.0.0.251 -j ACCEPT # zeroconf
|
iptables -I INPUT -p udp --dport mdns -d 224.0.0.251 -j ACCEPT # zeroconf
|
||||||
iptables -I OUTPUT -p udp --dport mdns -d 224.0.0.251 -j ACCEPT # zeroconf
|
iptables -I OUTPUT -p udp --dport mdns -d 224.0.0.251 -j ACCEPT # zeroconf
|
||||||
''; # networking.firewall.allowedUDPPorts = [ ... ];
|
''; # networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
@ -200,12 +199,20 @@ in {
|
||||||
# vater hoerte, dass menschen im space gern mpd fuer das abspielen von musik erwarten wuerden
|
# vater hoerte, dass menschen im space gern mpd fuer das abspielen von musik erwarten wuerden
|
||||||
#### https://nixos.org/nixos/options.html#services.mpd.enable
|
#### https://nixos.org/nixos/options.html#services.mpd.enable
|
||||||
# See ../../mpd.nix
|
# See ../../mpd.nix
|
||||||
services.mpd.extraConfig = ''
|
services.mpd = {
|
||||||
audio_output {
|
enable = true;
|
||||||
type "pulse"
|
dbFile = null;
|
||||||
name "/proc"
|
musicDirectory = "/mnt/storage/Music";
|
||||||
}
|
playlistDirectory = "/home/k-ot/Playlists";
|
||||||
'';
|
network.listenAddress = "any";
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
audio_output {
|
||||||
|
type "pulse"
|
||||||
|
name "/proc"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
25
lib/mpd.nix
25
lib/mpd.nix
|
@ -1,25 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
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";
|
|
||||||
playlistDirectory = "/home/k-ot/Playlists";
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
c3d2.hq.enableMpdProxy = true;
|
|
||||||
services.mpd = (hostMpd // {
|
|
||||||
enable = true;
|
|
||||||
network.listenAddress = "any";
|
|
||||||
});
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ config.services.mpd.network.port ];
|
|
||||||
}
|
|
Loading…
Reference in New Issue