aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/websites
diff options
context:
space:
mode:
Diffstat (limited to 'nixops/modules/websites')
-rw-r--r--nixops/modules/websites/tools/tools/default.nix4
-rw-r--r--nixops/modules/websites/tools/tools/ympd.json15
-rw-r--r--nixops/modules/websites/tools/tools/ympd.nix15
3 files changed, 32 insertions, 2 deletions
diff --git a/nixops/modules/websites/tools/tools/default.nix b/nixops/modules/websites/tools/tools/default.nix
index 5db7d3e..2e10a46 100644
--- a/nixops/modules/websites/tools/tools/default.nix
+++ b/nixops/modules/websites/tools/tools/default.nix
@@ -117,6 +117,10 @@ in {
117 dokuwiki = dokuwiki.activationScript; 117 dokuwiki = dokuwiki.activationScript;
118 }; 118 };
119 119
120 nixpkgs.config.packageOverrides = oldpkgs: rec {
121 ympd = oldpkgs.ympd.overrideAttrs(old: mylibs.fetchedGithub ./ympd.json);
122 };
123
120 systemd.services.tt-rss = { 124 systemd.services.tt-rss = {
121 description = "Tiny Tiny RSS feeds update daemon"; 125 description = "Tiny Tiny RSS feeds update daemon";
122 serviceConfig = { 126 serviceConfig = {
diff --git a/nixops/modules/websites/tools/tools/ympd.json b/nixops/modules/websites/tools/tools/ympd.json
new file mode 100644
index 0000000..51f06d5
--- /dev/null
+++ b/nixops/modules/websites/tools/tools/ympd.json
@@ -0,0 +1,15 @@
1{
2 "tag": "612f8fc-master",
3 "meta": {
4 "name": "ympd",
5 "url": "https://github.com/notandy/ympd",
6 "branch": "master"
7 },
8 "github": {
9 "owner": "notandy",
10 "repo": "ympd",
11 "rev": "612f8fc0b2c47fc89d403e4a044541c6b2b238c8",
12 "sha256": "01hnj10zl103mrn82vyd42fvq7w5az3jf1qz18889zv67kn73ll9",
13 "fetchSubmodules": true
14 }
15}
diff --git a/nixops/modules/websites/tools/tools/ympd.nix b/nixops/modules/websites/tools/tools/ympd.nix
index 3d0faad..613a171 100644
--- a/nixops/modules/websites/tools/tools/ympd.nix
+++ b/nixops/modules/websites/tools/tools/ympd.nix
@@ -3,14 +3,17 @@ let
3 ympd = rec { 3 ympd = rec {
4 config = { 4 config = {
5 webPort = "localhost:${env.listenPort}"; 5 webPort = "localhost:${env.listenPort}";
6 mpd = env.mpd; 6 mpd = {
7 host = "${env.mpd.host} --mpdpass ${env.mpd.password}";
8 port = env.mpd.port;
9 };
7 }; 10 };
8 apache = { 11 apache = {
9 modules = [ 12 modules = [
10 "proxy_wstunnel" 13 "proxy_wstunnel"
11 ]; 14 ];
12 vhostConf = '' 15 vhostConf = ''
13 <LocationMatch "^/mpd"> 16 <LocationMatch "^/mpd(?!/music.(mp3|ogg))">
14 Use LDAPConnect 17 Use LDAPConnect
15 Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu 18 Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu
16 </LocationMatch> 19 </LocationMatch>
@@ -24,6 +27,14 @@ let
24 <Location "/mpd/ws"> 27 <Location "/mpd/ws">
25 ProxyPass ws://${config.webPort}/ws 28 ProxyPass ws://${config.webPort}/ws
26 </Location> 29 </Location>
30 <Location "/mpd/music.mp3">
31 ProxyPass http://localhost:${env.mp3port}/
32 ProxyPassReverse http://localhost:${env.mp3port}/
33 </Location>
34 <Location "/mpd/music.ogg">
35 ProxyPass http://localhost:${env.oggport}/
36 ProxyPassReverse http://localhost:${env.oggport}/
37 </Location>
27 ''; 38 '';
28 }; 39 };
29 }; 40 };