diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-29 11:03:03 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-29 11:03:03 +0100 |
commit | a05f8abec045c9bf6a47fd87d028984c1237130c (patch) | |
tree | 2cbf094bac789626805c7357b62a56f036006bba | |
parent | 95413adffe969f33cb560227735ab4b32d9d390a (diff) | |
download | Nix-a05f8abec045c9bf6a47fd87d028984c1237130c.tar.gz Nix-a05f8abec045c9bf6a47fd87d028984c1237130c.tar.zst Nix-a05f8abec045c9bf6a47fd87d028984c1237130c.zip |
Add ympd
-rw-r--r-- | virtual/eldiron.nix | 3 | ||||
-rw-r--r-- | virtual/packages.nix | 30 |
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 | }; | ||
65 | in | 94 | in |
66 | { | 95 | { |
67 | inherit adminer; | 96 | inherit adminer; |
97 | inherit ympd; | ||
68 | } | 98 | } |