From a05f8abec045c9bf6a47fd87d028984c1237130c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 29 Dec 2018 11:03:03 +0100 Subject: [PATCH] Add ympd --- virtual/eldiron.nix | 3 +++ virtual/packages.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/virtual/eldiron.nix b/virtual/eldiron.nix index 50aaeab..160595d 100644 --- a/virtual/eldiron.nix +++ b/virtual/eldiron.nix @@ -52,6 +52,8 @@ }; }; + services.ympd = mypkgs.ympd.config // { enable = true; }; + # FIXME: open_basedir services.phpfpm = { extraConfig = '' @@ -133,6 +135,7 @@ documentRoot = null; extraConfig = builtins.concatStringsSep "\n" [ mypkgs.adminer.apache.vhostConf + mypkgs.ympd.apache.vhostConf ]; }) { # Should go last, default fallback diff --git a/virtual/packages.nix b/virtual/packages.nix index c257dab..6d85411 100644 --- a/virtual/packages.nix +++ b/virtual/packages.nix @@ -62,7 +62,37 @@ let ''; }; }; + + ympd = rec { + config = { + webPort = "localhost:18001"; + mpd = { + host = "malige.home.immae.eu"; + port = 6600; + }; + }; + apache = { + vhostConf = '' + + Use LDAPConnect + Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu + Require local + + + RedirectMatch permanent "^/mpd$" "/mpd/" + + ProxyPass http://${config.webPort}/ + ProxyPassReverse http://${config.webPort}/ + ProxyPreserveHost on + + + ProxyPass ws://${config.webPort}/ws + + ''; + }; + }; in { inherit adminer; + inherit ympd; } -- 2.41.0