From 9df76627240b567f8cbb00d1b429aa3541243558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 22 Apr 2019 19:03:18 +0200 Subject: Use sockets instead of ports in mpd --- nixops/modules/mpd/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'nixops/modules/mpd/default.nix') 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 @@ }; networking.firewall.allowedTCPPorts = [ 6600 ]; users.users.mpd.extraGroups = [ "wwwrun" "keys" ]; + system.activationScripts.mpd = '' + install -d -m 0755 -o mpd -g mpd /run/mpd + ''; services.mpd = { enable = true; network.listenAddress = "any"; @@ -35,8 +38,7 @@ type "httpd" name "OGG" encoder "vorbis" - port "${myconfig.env.ports.mpd_ogg}" - bind_to_address "127.0.0.1" + bind_to_address "/run/mpd/ogg.sock" quality "5.0" format "44100:16:1" } @@ -44,8 +46,7 @@ type "httpd" name "MP3" encoder "lame" - port "${myconfig.env.ports.mpd_mp3}" - bind_to_address "127.0.0.1" + bind_to_address "/run/mpd/mp3.sock" quality "5.0" format "44100:16:1" } -- cgit v1.2.3