aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/mpd
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-07 15:07:00 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-07 15:07:00 +0200
commit79d2de8b83d765721b2cb720b2bc59673df54a4a (patch)
treedb989f06302e31a1468832d106d25d611717e363 /nixops/modules/mpd
parent86663f1789aecdb62e44a4be46e0ed111b795a09 (diff)
downloadNix-79d2de8b83d765721b2cb720b2bc59673df54a4a.tar.gz
Nix-79d2de8b83d765721b2cb720b2bc59673df54a4a.tar.zst
Nix-79d2de8b83d765721b2cb720b2bc59673df54a4a.zip
Move directories with only default.nix to standalone file
Diffstat (limited to 'nixops/modules/mpd')
-rw-r--r--nixops/modules/mpd/default.nix58
1 files changed, 0 insertions, 58 deletions
diff --git a/nixops/modules/mpd/default.nix b/nixops/modules/mpd/default.nix
deleted file mode 100644
index 7c896ca..0000000
--- a/nixops/modules/mpd/default.nix
+++ /dev/null
@@ -1,58 +0,0 @@
1{ lib, pkgs, config, myconfig, mylibs, ... }:
2{
3 config = {
4 mySecrets.keys = [
5 {
6 dest = "mpd";
7 permissions = "0400";
8 text = myconfig.env.mpd.password;
9 }
10 {
11 dest = "mpd-config";
12 permissions = "0400";
13 user = "mpd";
14 group = "mpd";
15 text = ''
16 password "${myconfig.env.mpd.password}@read,add,control,admin"
17 '';
18 }
19 ];
20 networking.firewall.allowedTCPPorts = [ 6600 ];
21 users.users.mpd.extraGroups = [ "wwwrun" "keys" ];
22 system.activationScripts.mpd = ''
23 install -d -m 0755 -o mpd -g mpd /run/mpd
24 '';
25 services.mpd = {
26 enable = true;
27 network.listenAddress = "any";
28 musicDirectory = myconfig.env.mpd.folder;
29 extraConfig = ''
30 include "/var/secrets/mpd-config"
31 audio_output {
32 type "null"
33 name "No Output"
34 mixer_type "none"
35 }
36 audio_output {
37 type "httpd"
38 name "OGG"
39 encoder "vorbis"
40 bind_to_address "/run/mpd/ogg.sock"
41 quality "5.0"
42 format "44100:16:1"
43 }
44 audio_output {
45 type "httpd"
46 name "MP3"
47 encoder "lame"
48 bind_to_address "/run/mpd/mp3.sock"
49 quality "5.0"
50 format "44100:16:1"
51 }
52
53
54 '';
55 };
56 };
57}
58