diff options
Diffstat (limited to 'nixops/modules/mpd')
-rw-r--r-- | nixops/modules/mpd/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/nixops/modules/mpd/default.nix b/nixops/modules/mpd/default.nix new file mode 100644 index 0000000..7781b36 --- /dev/null +++ b/nixops/modules/mpd/default.nix | |||
@@ -0,0 +1,41 @@ | |||
1 | { lib, pkgs, config, myconfig, mylibs, ... }: | ||
2 | { | ||
3 | config = { | ||
4 | networking.firewall.allowedTCPPorts = [ 6600 ]; | ||
5 | users.users.mpd.extraGroups = [ "wwwrun" ]; | ||
6 | services.mpd = { | ||
7 | enable = true; | ||
8 | network.listenAddress = "any"; | ||
9 | musicDirectory = myconfig.env.mpd.folder; | ||
10 | extraConfig = '' | ||
11 | password "${myconfig.env.mpd.password}@read,add,control,admin" | ||
12 | audio_output { | ||
13 | type "null" | ||
14 | name "No Output" | ||
15 | mixer_type "none" | ||
16 | } | ||
17 | audio_output { | ||
18 | type "httpd" | ||
19 | name "OGG" | ||
20 | encoder "vorbis" | ||
21 | port "${myconfig.env.ports.mpd_ogg}" | ||
22 | bind_to_address "127.0.0.1" | ||
23 | quality "5.0" | ||
24 | format "44100:16:1" | ||
25 | } | ||
26 | audio_output { | ||
27 | type "httpd" | ||
28 | name "MP3" | ||
29 | encoder "lame" | ||
30 | port "${myconfig.env.ports.mpd_mp3}" | ||
31 | bind_to_address "127.0.0.1" | ||
32 | quality "5.0" | ||
33 | format "44100:16:1" | ||
34 | } | ||
35 | |||
36 | |||
37 | ''; | ||
38 | }; | ||
39 | }; | ||
40 | } | ||
41 | |||