aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/mpd/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-22 19:03:18 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-22 19:03:18 +0200
commit9df76627240b567f8cbb00d1b429aa3541243558 (patch)
tree20caf5738c1a3e1120de70d88623794707e951d2 /nixops/modules/mpd/default.nix
parent65e649254aa406277f5e8b99adf1114e6ac373ca (diff)
downloadNix-9df76627240b567f8cbb00d1b429aa3541243558.tar.gz
Nix-9df76627240b567f8cbb00d1b429aa3541243558.tar.zst
Nix-9df76627240b567f8cbb00d1b429aa3541243558.zip
Use sockets instead of ports in mpd
Diffstat (limited to 'nixops/modules/mpd/default.nix')
-rw-r--r--nixops/modules/mpd/default.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/nixops/modules/mpd/default.nix b/nixops/modules/mpd/default.nix
index 9e1715b..2cf37ad 100644
--- a/nixops/modules/mpd/default.nix
+++ b/nixops/modules/mpd/default.nix
@@ -20,6 +20,9 @@
20 }; 20 };
21 networking.firewall.allowedTCPPorts = [ 6600 ]; 21 networking.firewall.allowedTCPPorts = [ 6600 ];
22 users.users.mpd.extraGroups = [ "wwwrun" "keys" ]; 22 users.users.mpd.extraGroups = [ "wwwrun" "keys" ];
23 system.activationScripts.mpd = ''
24 install -d -m 0755 -o mpd -g mpd /run/mpd
25 '';
23 services.mpd = { 26 services.mpd = {
24 enable = true; 27 enable = true;
25 network.listenAddress = "any"; 28 network.listenAddress = "any";
@@ -35,8 +38,7 @@
35 type "httpd" 38 type "httpd"
36 name "OGG" 39 name "OGG"
37 encoder "vorbis" 40 encoder "vorbis"
38 port "${myconfig.env.ports.mpd_ogg}" 41 bind_to_address "/run/mpd/ogg.sock"
39 bind_to_address "127.0.0.1"
40 quality "5.0" 42 quality "5.0"
41 format "44100:16:1" 43 format "44100:16:1"
42 } 44 }
@@ -44,8 +46,7 @@
44 type "httpd" 46 type "httpd"
45 name "MP3" 47 name "MP3"
46 encoder "lame" 48 encoder "lame"
47 port "${myconfig.env.ports.mpd_mp3}" 49 bind_to_address "/run/mpd/mp3.sock"
48 bind_to_address "127.0.0.1"
49 quality "5.0" 50 quality "5.0"
50 format "44100:16:1" 51 format "44100:16:1"
51 } 52 }