diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-11 00:16:15 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-11 00:16:15 +0100 |
commit | e229e6f2a411b9c03ee80bfb53b6b77e8f2ccb0b (patch) | |
tree | 5048061078e8e2e31930a93dbf53899e88958597 /nixops/modules/mpd | |
parent | 0a03d9d7b89f101ac889e13b622cfa86705da20f (diff) | |
download | Nix-e229e6f2a411b9c03ee80bfb53b6b77e8f2ccb0b.tar.gz Nix-e229e6f2a411b9c03ee80bfb53b6b77e8f2ccb0b.tar.zst Nix-e229e6f2a411b9c03ee80bfb53b6b77e8f2ccb0b.zip |
Add mpd and make adjustments
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 | |||