blob: 7781b363dba7bbbaaff1b38297047e602c32537a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ lib, pkgs, config, myconfig, mylibs, ... }:
{
config = {
networking.firewall.allowedTCPPorts = [ 6600 ];
users.users.mpd.extraGroups = [ "wwwrun" ];
services.mpd = {
enable = true;
network.listenAddress = "any";
musicDirectory = myconfig.env.mpd.folder;
extraConfig = ''
password "${myconfig.env.mpd.password}@read,add,control,admin"
audio_output {
type "null"
name "No Output"
mixer_type "none"
}
audio_output {
type "httpd"
name "OGG"
encoder "vorbis"
port "${myconfig.env.ports.mpd_ogg}"
bind_to_address "127.0.0.1"
quality "5.0"
format "44100:16:1"
}
audio_output {
type "httpd"
name "MP3"
encoder "lame"
port "${myconfig.env.ports.mpd_mp3}"
bind_to_address "127.0.0.1"
quality "5.0"
format "44100:16:1"
}
'';
};
};
}
|