aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--virtual/eldiron.nix3
-rw-r--r--virtual/packages.nix30
2 files changed, 33 insertions, 0 deletions
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 @@
52 }; 52 };
53 }; 53 };
54 54
55 services.ympd = mypkgs.ympd.config // { enable = true; };
56
55 # FIXME: open_basedir 57 # FIXME: open_basedir
56 services.phpfpm = { 58 services.phpfpm = {
57 extraConfig = '' 59 extraConfig = ''
@@ -133,6 +135,7 @@
133 documentRoot = null; 135 documentRoot = null;
134 extraConfig = builtins.concatStringsSep "\n" [ 136 extraConfig = builtins.concatStringsSep "\n" [
135 mypkgs.adminer.apache.vhostConf 137 mypkgs.adminer.apache.vhostConf
138 mypkgs.ympd.apache.vhostConf
136 ]; 139 ];
137 }) 140 })
138 { # Should go last, default fallback 141 { # 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
62 ''; 62 '';
63 }; 63 };
64 }; 64 };
65
66 ympd = rec {
67 config = {
68 webPort = "localhost:18001";
69 mpd = {
70 host = "malige.home.immae.eu";
71 port = 6600;
72 };
73 };
74 apache = {
75 vhostConf = ''
76 <LocationMatch "^/mpd">
77 Use LDAPConnect
78 Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu
79 Require local
80 </LocationMatch>
81
82 RedirectMatch permanent "^/mpd$" "/mpd/"
83 <Location "/mpd/">
84 ProxyPass http://${config.webPort}/
85 ProxyPassReverse http://${config.webPort}/
86 ProxyPreserveHost on
87 </Location>
88 <Location "/mpd/ws">
89 ProxyPass ws://${config.webPort}/ws
90 </Location>
91 '';
92 };
93 };
65in 94in
66 { 95 {
67 inherit adminer; 96 inherit adminer;
97 inherit ympd;
68 } 98 }