aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/tools
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-25 03:01:39 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-25 03:01:39 +0200
commit251c0a135a4153453030dc0e2c132e57934c0095 (patch)
treee7ab615568cdfe2526b508e483b2a6c6cad4350e /modules/private/websites/tools
parentc54f73c385dcdb7458759b36b62fa0e6895a30d7 (diff)
downloadNix-251c0a135a4153453030dc0e2c132e57934c0095.tar.gz
Nix-251c0a135a4153453030dc0e2c132e57934c0095.tar.zst
Nix-251c0a135a4153453030dc0e2c132e57934c0095.zip
Migrate manual scripts from tools.immae.eu
Landing page BIP39 ldap/myip scripts webhooks
Diffstat (limited to 'modules/private/websites/tools')
-rw-r--r--modules/private/websites/tools/tools/default.nix51
-rw-r--r--modules/private/websites/tools/tools/landing.nix21
-rw-r--r--modules/private/websites/tools/tools/landing/config.yml210
-rw-r--r--modules/private/websites/tools/tools/landing/icons/adminer.pngbin0 -> 220 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/buildbot.png0
-rw-r--r--modules/private/websites/tools/tools/landing/icons/buildbot.svg13
-rw-r--r--modules/private/websites/tools/tools/landing/icons/diaspora.pngbin0 -> 1666 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/dokuwiki.pngbin0 -> 3744 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/etherpad.icobin0 -> 4286 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/gitweb.pngbin0 -> 1125 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/grocy.pngbin0 -> 3823 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/kanboard.pngbin0 -> 2673 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/mantisbt.pngbin0 -> 10861 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/mastodon.pngbin0 -> 4880 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/mgoblin.icobin0 -> 318 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/nextcloud.pngbin0 -> 2918 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/peertube.pngbin0 -> 746 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/phpbb.icobin0 -> 24038 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/rainloop.pngbin0 -> 832 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/rompr.pngbin0 -> 44454 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/roundcube.svg15
-rw-r--r--modules/private/websites/tools/tools/landing/icons/shaarli.pngbin0 -> 18276 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/ttrss.pngbin0 -> 2774 bytes
-rw-r--r--modules/private/websites/tools/tools/landing/icons/wallabag.svg1
-rw-r--r--modules/private/websites/tools/tools/landing/ldap_password.php137
-rw-r--r--modules/private/websites/tools/tools/landing/myip.php1
-rw-r--r--modules/private/websites/tools/tools/webhooks.nix10
27 files changed, 454 insertions, 5 deletions
diff --git a/modules/private/websites/tools/tools/default.nix b/modules/private/websites/tools/tools/default.nix
index 2fe4775..dbd65e6 100644
--- a/modules/private/websites/tools/tools/default.nix
+++ b/modules/private/websites/tools/tools/default.nix
@@ -38,6 +38,11 @@ let
38 grocy = pkgs.callPackage ./grocy.nix { 38 grocy = pkgs.callPackage ./grocy.nix {
39 inherit (pkgs.webapps) grocy; 39 inherit (pkgs.webapps) grocy;
40 }; 40 };
41 webhooks = pkgs.callPackage ./webhooks.nix {
42 env = config.myEnv.tools.webhooks;
43 };
44
45 landing = pkgs.callPackage ./landing.nix {};
41 46
42 cfg = config.myServices.websites.tools.tools; 47 cfg = config.myServices.websites.tools.tools;
43 pcfg = config.services.phpfpm.pools; 48 pcfg = config.services.phpfpm.pools;
@@ -53,7 +58,8 @@ in {
53 ++ shaarli.keys 58 ++ shaarli.keys
54 ++ ttrss.keys 59 ++ ttrss.keys
55 ++ wallabag.keys 60 ++ wallabag.keys
56 ++ yourls.keys; 61 ++ yourls.keys
62 ++ webhooks.keys;
57 63
58 services.duplyBackup.profiles = { 64 services.duplyBackup.profiles = {
59 dokuwiki = dokuwiki.backups; 65 dokuwiki = dokuwiki.backups;
@@ -111,9 +117,16 @@ in {
111 RedirectMatch 301 ^/roundcube(.*)$ https://mail.immae.eu/roundcube$1 117 RedirectMatch 301 ^/roundcube(.*)$ https://mail.immae.eu/roundcube$1
112 RedirectMatch 301 ^/jappix(.*)$ https://im.immae.fr/converse 118 RedirectMatch 301 ^/jappix(.*)$ https://im.immae.fr/converse
113 119
114 RewriteEngine On 120 Alias /landing ${landing}
115 RewriteCond %{DOCUMENT_ROOT}/homer%{REQUEST_URI} -f 121 <Directory "${landing}">
116 RewriteRule ^(.*)$ /homer$1 [QSA,L] 122 DirectoryIndex index.html
123 AllowOverride None
124 Require all granted
125
126 <FilesMatch "\.php$">
127 SetHandler "proxy:unix:${pcfg.tools.socket}|fcgi://localhost"
128 </FilesMatch>
129 </Directory>
117 130
118 <Directory "/var/lib/ftp/tools.immae.eu"> 131 <Directory "/var/lib/ftp/tools.immae.eu">
119 DirectoryIndex index.php index.htm index.html 132 DirectoryIndex index.php index.htm index.html
@@ -122,6 +135,11 @@ in {
122 <FilesMatch "\.php$"> 135 <FilesMatch "\.php$">
123 SetHandler "proxy:unix:${pcfg.tools.socket}|fcgi://localhost" 136 SetHandler "proxy:unix:${pcfg.tools.socket}|fcgi://localhost"
124 </FilesMatch> 137 </FilesMatch>
138
139 RewriteEngine On
140 RewriteCond ${landing}%{REQUEST_URI} -f
141 RewriteRule ^(.*)$ /landing/$1 [L]
142 RewriteRule ^$ /landing/ [L]
125 </Directory> 143 </Directory>
126 '' 144 ''
127 (adminer.apache.vhostConf pcfg.adminer.socket) 145 (adminer.apache.vhostConf pcfg.adminer.socket)
@@ -143,6 +161,23 @@ in {
143 Require all granted 161 Require all granted
144 Options -Indexes 162 Options -Indexes
145 </Directory> 163 </Directory>
164
165 Alias /BIP39 /var/lib/buildbot/outputs/bip39
166 <Directory "/var/lib/buildbot/outputs/bip39">
167 DirectoryIndex index.html
168 AllowOverride None
169 Require all granted
170 </Directory>
171
172 Alias /webhooks ${config.secrets.location}/webapps/webhooks
173 <Directory "${config.secrets.location}/webapps/webhooks">
174 Options -Indexes
175 Require all granted
176 AllowOverride None
177 <FilesMatch "\.php$">
178 SetHandler "proxy:unix:${pcfg.tools.socket}|fcgi://localhost"
179 </FilesMatch>
180 </Directory>
146 '' 181 ''
147 ]; 182 ];
148 }; 183 };
@@ -253,7 +288,13 @@ in {
253 288
254 # Needed to avoid clashes in browser cookies (same domain) 289 # Needed to avoid clashes in browser cookies (same domain)
255 "php_value[session.name]" = "ToolsPHPSESSID"; 290 "php_value[session.name]" = "ToolsPHPSESSID";
256 "php_admin_value[open_basedir]" = "/run/wrappers/bin/sendmail:/var/lib/ftp/tools.immae.eu:/tmp"; 291 "php_admin_value[open_basedir]" = builtins.concatStringsSep ":" [
292 "/run/wrappers/bin/sendmail" "/var/lib/ftp/tools.immae.eu"
293 landing "/tmp" "${config.secrets.location}/webapps/webhooks"
294 ];
295 };
296 phpEnv = {
297 CONTACT_EMAIL = config.myEnv.tools.contact;
257 }; 298 };
258 }; 299 };
259 devtools = { 300 devtools = {
diff --git a/modules/private/websites/tools/tools/landing.nix b/modules/private/websites/tools/tools/landing.nix
new file mode 100644
index 0000000..ac5c3cf
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing.nix
@@ -0,0 +1,21 @@
1{ stdenv, fetchFromGitHub }:
2stdenv.mkDerivation rec {
3 pname = "homer";
4 version = "v1.0";
5 src = fetchFromGitHub {
6 owner = "bastienwirtz";
7 repo = "homer";
8 rev = version;
9 sha256 = "0pgpkbqdg4728c8xan5q3lfb8najq118wn2497mc3h0md7l09m63";
10 };
11
12 phases = ["unpackPhase" "installPhase"];
13
14 installPhase = ''
15 cp -a . $out
16 sed -i -e "s/vlayout: true,/vlayout: false,/" $out/app.js
17 cp ${./landing}/config.yml $out/
18 cp ${./landing}/*.php $out/
19 cp ${./landing}/icons/* $out/assets/tools/
20 '';
21}
diff --git a/modules/private/websites/tools/tools/landing/config.yml b/modules/private/websites/tools/tools/landing/config.yml
new file mode 100644
index 0000000..42ebcd1
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/config.yml
@@ -0,0 +1,210 @@
1---
2# Homepage configuration
3# See https://fontawesome.com/icons for icons options
4
5title: "Websites dashboard"
6subtitle: "Immae"
7footer: false
8
9# Optional navbar
10# links: [] # Allows for navbar (dark mode, layout, and search) without any links
11links:
12 - name: "status"
13 icon: "fas fa-desktop"
14 url: "https://status.immae.eu"
15 target: '_blank' # optionnal html a tag target attribute
16 - name: "Change password"
17 url: "https://tools.immae.eu/ldap_password.php"
18 target: '_blank'
19 - name: "Get your IP"
20 url: "https://tools.immae.eu/myip.php"
21 target: '_blank'
22
23# Services
24# First level array represent a group.
25# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
26services:
27 - name: "Tools"
28 icon: "fas fa-tools"
29 items:
30 - name: "Nextcloud"
31 logo: "assets/tools/nextcloud.png"
32 url: "https://cloud.immae.eu"
33 target: '_blank'
34 - name: "Etherpad"
35 logo: "assets/tools/etherpad.ico"
36 url: "https://ether.immae.eu"
37 target: '_blank'
38 - name: "Taskweb"
39 icon: "fas fa-tasks"
40 url: "https://task.immae.eu/taskweb"
41 target: '_blank'
42 - name: "Agenda"
43 icon: "fas fa-calendar-alt"
44 url: "https://dav.immae.eu/caldavzap"
45 target: '_blank'
46 - name: "Contacts"
47 icon: "fas fa-address-book"
48 url: "https://dav.immae.eu/carddavmate"
49 target: '_blank'
50 - name: "Kanboard"
51 logo: "assets/tools/kanboard.png"
52 url: "https://tools.immae.eu/kanboard"
53 target: '_blank'
54 - name: "Dokuwiki"
55 logo: "assets/tools/dokuwiki.png"
56 url: "https://tools.immae.eu/dokuwiki"
57 target: '_blank'
58 - name: "RompR (MPD)"
59 logo: "assets/tools/rompr.png"
60 url: "https://tools.immae.eu/rompr"
61 target: '_blank'
62 - name: "Ympd (MPD)"
63 icon: "far fa-play-circle"
64 url: "https://tools.immae.eu/mpd"
65 target: '_blank'
66 - name: "Shaarli"
67 logo: "assets/tools/shaarli.png"
68 url: "https://tools.immae.eu/Shaarli"
69 target: '_blank'
70 - name: "TT-RSS"
71 logo: "assets/tools/ttrss.png"
72 url: "https://tools.immae.eu/ttrss"
73 target: '_blank'
74 - name: "Wallabag"
75 logo: "assets/tools/wallabag.svg"
76 url: "https://tools.immae.eu/wallabag"
77 target: '_blank'
78 - name: "Grocy"
79 logo: "assets/tools/grocy.png"
80 url: "https://tools.immae.eu/grocy"
81 target: '_blank'
82 - name: "BIP39"
83 icon: "fab fa-bitcoin"
84 url: "https://tools.immae.eu/BIP39"
85 target: '_blank'
86 - name: "Social"
87 icon: "fas fa-users"
88 items:
89 - name: "Diaspora"
90 logo: "assets/tools/diaspora.png"
91 url: "https://diaspora.immae.eu"
92 target: '_blank'
93 - name: "Mastodon"
94 logo: "assets/tools/mastodon.png"
95 url: "https://mastodon.immae.eu"
96 target: '_blank'
97 - name: "PhpBB"
98 logo: "assets/tools/phpbb.ico"
99 url: "https://tools.immae.eu/forum"
100 target: '_blank'
101 - name: "Instant messaging (converse)"
102 icon: "fas fa-comment"
103 url: "https://im.immae.fr/converse"
104 target: '_blank'
105 - name: "Mail (roundcube)"
106 logo: "assets/tools/roundcube.svg"
107 url: "https://mail.immae.eu/roundcube"
108 target: '_blank'
109 - name: "Mail (rainloop)"
110 logo: "assets/tools/rainloop.png"
111 url: "https://mail.immae.eu/rainloop"
112 target: '_blank'
113 - name: "Video"
114 icon: "fas fa-video"
115 items:
116 - name: "Peertube"
117 logo: "assets/tools/peertube.png"
118 url: "https://peertube.immae.eu"
119 target: '_blank'
120 - name: "Mediagoblin"
121 logo: "assets/tools/mgoblin.ico"
122 url: "https://mgoblin.immae.eu"
123 target: '_blank'
124 - name: "Development"
125 icon: "fas fa-code-branch"
126 items:
127 - name: "Gitweb"
128 logo: "assets/tools/gitweb.png"
129 url: "https://git.immae.eu"
130 target: '_blank'
131 - name: "Mantisbt"
132 logo: "assets/tools/mantisbt.png"
133 url: "https://git.immae.eu/mantisbt"
134 target: '_blank'
135 - name: "Buildbot"
136 logo: "assets/tools/buildbot.svg"
137 url: "https://git.immae.eu/buildbot/immaeEu/"
138 target: '_blank'
139 - name: "Adminer"
140 logo: "assets/tools/adminer.png"
141 url: "https://tools.immae.eu/adminer"
142 target: '_blank'
143 - name: "Release"
144 icon: "fas fa-running"
145 url: "https://release.immae.eu"
146 target: '_blank'
147 - name: "Immae"
148 icon: "fas fa-edit"
149 items:
150 - name: "Page principale"
151 icon: "fas fa-user"
152 url: "https://www.immae.eu"
153 target: '_blank'
154 - name: "Atelier d’écriture"
155 icon: "fas fa-pen"
156 url: "https://www.immae.eu/atelier"
157 target: '_blank'
158 - name: "Blog"
159 icon: "fas fa-blog"
160 url: "https://www.immae.eu/blog"
161 target: '_blank'
162 - name: "Recherche"
163 icon: "fas fa-search"
164 url: "https://www.immae.eu/recherche"
165 target: '_blank'
166 - name: "Cours"
167 icon: "fas fa-school"
168 url: "https://www.immae.eu/cours"
169 target: '_blank'
170 - name: "Recettes"
171 icon: "fas fa-utensils"
172 url: "https://www.immae.eu/recettes"
173 target: '_blank'
174 - name: "Chapeaux de Hamming"
175 icon: "fas fa-hat-cowboy-side"
176 url: "https://www.immae.eu/chapeaux"
177 target: '_blank'
178 - name: "Configuration"
179 icon: "fas fa-cog"
180 items:
181 - name: "Instant messaging"
182 url: "https://im.immae.fr"
183 target: '_blank'
184 - name: "E-mail"
185 url: "https://mail.immae.eu"
186 target: '_blank'
187 - name: "VPN"
188 url: "https://vpn.immae.eu"
189 target: '_blank'
190 - name: "Taskwarrior"
191 url: "https://task.immae.eu"
192 target: '_blank'
193 - name: "Dav"
194 url: "https://dav.immae.eu"
195 target: '_blank'
196 - name: "Dav acount"
197 url: "https://dav.immae.eu/davical"
198 target: '_blank'
199 - name: "Paste"
200 url: "https://tools.immae.eu/paste"
201 target: '_blank'
202 - name: "LDAP"
203 url: "https://tools.immae.eu/ldap"
204 target: '_blank'
205 - name: "Yourls"
206 url: "https://tools.immae.eu/url/admin/"
207 target: '_blank'
208 - name: "Change password"
209 url: "https://tools.immae.eu/ldap_password.php"
210 target: '_blank'
diff --git a/modules/private/websites/tools/tools/landing/icons/adminer.png b/modules/private/websites/tools/tools/landing/icons/adminer.png
new file mode 100644
index 0000000..f5923d8
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/adminer.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/buildbot.png b/modules/private/websites/tools/tools/landing/icons/buildbot.png
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/buildbot.png
diff --git a/modules/private/websites/tools/tools/landing/icons/buildbot.svg b/modules/private/websites/tools/tools/landing/icons/buildbot.svg
new file mode 100644
index 0000000..4972a11
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/buildbot.svg
@@ -0,0 +1,13 @@
1<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300" fill-rule="evenodd" aria-label="Nut" stroke-width="5" stroke="#000" stroke-linejoin="round">
2 <defs>
3 <linearGradient id="a" x1="61.3" x2="61.3" y1="31.7" y2="194.3" gradientTransform="matrix(1.28514 0 0 .76264 1.5 .5)" gradientUnits="userSpaceOnUse">
4 <stop offset="0%" stop-color="#8da6d8"/>
5 <stop offset="100%" stop-color="#2e5cb8"/>
6 </linearGradient>
7 </defs>
8 <path d="M10.7 205.4v-43l101.9 91.5v42.5z" fill="#24478f" stroke-width="4.9"/>
9 <path d="M112.7 254l139-33.7v43.2l-139 33.5v-43z" fill="#2e5cb8" stroke-width="4.9"/>
10 <path d="M251.8 220.3v43.2l37.2-125v-43z" fill="#193366" stroke-width="4.9"/>
11 <path d="M187.2 4L289 95.5l-37.2 124.8-139.2 33.5-101.8-91.4L48 37.5zm-3.5 72.6c32 16.7 43 53.6 24.4 82.5-18.4 28.8-59.6 38.7-91.8 22-32-16.5-43-53.6-24.4-82.4 18.3-28.9 59.4-38.9 91.7-22.2z" fill="#8da6d8" stroke-width="4.9"/>
12 <path d="M85.5 146a54.8 54.8 0 0 1 6-47.3c18.8-28.9 60-38.8 92-22 27.5 14.3 39.6 43.4 30.7 69.5a61.8 61.8 0 0 0-30.6-35c-32.2-16.6-73.4-6.7-92 22.2a57.4 57.4 0 0 0-6 12.8z" fill="url(#a)" stroke-width="4.9"/>
13</svg> \ No newline at end of file
diff --git a/modules/private/websites/tools/tools/landing/icons/diaspora.png b/modules/private/websites/tools/tools/landing/icons/diaspora.png
new file mode 100644
index 0000000..7b23d5d
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/diaspora.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/dokuwiki.png b/modules/private/websites/tools/tools/landing/icons/dokuwiki.png
new file mode 100644
index 0000000..a1f4995
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/dokuwiki.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/etherpad.ico b/modules/private/websites/tools/tools/landing/icons/etherpad.ico
new file mode 100644
index 0000000..938e955
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/etherpad.ico
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/gitweb.png b/modules/private/websites/tools/tools/landing/icons/gitweb.png
new file mode 100644
index 0000000..4fa44bb
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/gitweb.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/grocy.png b/modules/private/websites/tools/tools/landing/icons/grocy.png
new file mode 100644
index 0000000..40be557
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/grocy.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/kanboard.png b/modules/private/websites/tools/tools/landing/icons/kanboard.png
new file mode 100644
index 0000000..51702e7
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/kanboard.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/mantisbt.png b/modules/private/websites/tools/tools/landing/icons/mantisbt.png
new file mode 100644
index 0000000..729e3ea
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/mantisbt.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/mastodon.png b/modules/private/websites/tools/tools/landing/icons/mastodon.png
new file mode 100644
index 0000000..b12aa55
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/mastodon.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/mgoblin.ico b/modules/private/websites/tools/tools/landing/icons/mgoblin.ico
new file mode 100644
index 0000000..ae5a1b1
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/mgoblin.ico
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/nextcloud.png b/modules/private/websites/tools/tools/landing/icons/nextcloud.png
new file mode 100644
index 0000000..6358068
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/nextcloud.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/peertube.png b/modules/private/websites/tools/tools/landing/icons/peertube.png
new file mode 100644
index 0000000..a42fce3
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/peertube.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/phpbb.ico b/modules/private/websites/tools/tools/landing/icons/phpbb.ico
new file mode 100644
index 0000000..bb61b89
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/phpbb.ico
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/rainloop.png b/modules/private/websites/tools/tools/landing/icons/rainloop.png
new file mode 100644
index 0000000..ce1dd1a
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/rainloop.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/rompr.png b/modules/private/websites/tools/tools/landing/icons/rompr.png
new file mode 100644
index 0000000..d7b63b1
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/rompr.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/roundcube.svg b/modules/private/websites/tools/tools/landing/icons/roundcube.svg
new file mode 100644
index 0000000..1f50dd8
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/roundcube.svg
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8"?>
2<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="9.14 141.8 573.65 573.65">
3<style type="text/css">
4.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#404F54;}
5.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#E5E5E5;}
6.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#CCCCCC;}
7.st3{fill-rule:evenodd;clip-rule:evenodd;fill:#37BEFF;}
8</style>
9<polygon class="st3" points="582.79,549.77 295.96,384.1 295.96,207.27 582.79,372.95 "/>
10<polygon class="st0" points="9.14,549.77 295.96,384.1 295.96,207.27 9.14,372.95 "/>
11<path class="st2" d="M295.96,141.8c109.56,0,198.41,88.85,198.41,198.41c0,109.56-88.85,198.41-198.41,198.41 c-109.56,0-198.41-88.85-198.41-198.41C97.55,230.65,186.4,141.8,295.96,141.8"/>
12<path class="st1" d="M295.96,141.8c109.6,0,198.48,88.85,198.48,198.41c0,109.56-88.88,198.41-198.48,198.41 c-62.91-42.34-88.94-127.64-88.94-198.3S233.05,184.22,295.96,141.8"/>
13<polygon class="st3" points="582.79,372.95 295.96,538.62 295.96,715.45 582.79,549.77 "/>
14<polygon class="st0" points="9.14,372.95 295.96,538.62 295.96,715.45 9.14,549.77 "/>
15</svg>
diff --git a/modules/private/websites/tools/tools/landing/icons/shaarli.png b/modules/private/websites/tools/tools/landing/icons/shaarli.png
new file mode 100644
index 0000000..f29210c
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/shaarli.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/ttrss.png b/modules/private/websites/tools/tools/landing/icons/ttrss.png
new file mode 100644
index 0000000..97437d2
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/ttrss.png
Binary files differ
diff --git a/modules/private/websites/tools/tools/landing/icons/wallabag.svg b/modules/private/websites/tools/tools/landing/icons/wallabag.svg
new file mode 100644
index 0000000..7b87fed
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/icons/wallabag.svg
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path fill="none" d="M0 0h200v200H0z"/><path d="M75.899 72.438c1.597-.981 10.207-5.556 24.098.178 14.289 5.897 23.154.776 24.253.079-3.454-5.678-7.562-10.62-12.104-13.943.303-.083.612-.167.939-.263 6.023-1.742 7.553-6.842 7.875-11.21.364-4.954.616-5.03 1.692-9.487 1.032-4.281-.119-5.137-1.181-4.273-.572.465-5.552 1.616-8.505 3.919-4.768 3.72-7.707 10.794-9.039 14.706-.025.06-.205.604-.265.792-.621 1.498-1.857 1.494-1.857 1.494v.001c-.6-.065-1.202-.1-1.809-.1-.54 0-1.079.029-1.616.081-.012.002-.019 0-.031.001-1.581.233-2.45-1.697-2.632-2.157-1.847-5.304-6.816-15.763-17.984-18.577 0 0-2.028-1.554-1.41 1.074.588 2.511 1.804 5.049 1.534 8.741-.124 1.704-1.181 10.442 6.85 14.99.763.432 1.441.795 2.051 1.101-4.042 3.235-7.716 7.74-10.859 12.853zM128.626 152.353c-9.842-6.098-13.153-8.242-12.946-10.575 0 0 .002-.379.099-.957.239-1.236.995-3.348 3.407-4.552.079-.039.146-.084.208-.129 7.668-4.45 13.27-11.614 15.246-20.56-1.99 4.941-16.735 8.78-34.645 8.78-17.903 0-32.651-3.839-34.641-8.78.442 2.008 1.073 3.923 1.864 5.742.666 3.745 1.562 12.563-2.673 20.282-3.731 6.8-22.15 16.069-49.485 10.748 0 0-1.096-.766-1.428-.136-.491.932 1.517 1.685 3.583 2.229 19.031 5.04 47.756 2.989 56.777-4.443 4.116-3.388 5.704-7.953 6.107-12.865l.003.008s.11-1.287 1.719-.32c.461.277 2.125 1.36 2.39 2.585.232 1.743.248 3.883-.652 5.382-1.287 2.144-1.301 2.452.393 3.662 1.04.742 5.287 3.864 11.198 7.415.015.01.023.019.038.027 1.25.753 2.987 2.597 2.987 2.597 2.662 3.079 8.452 9.275 10.972 8.108 1.19-.551-.051-3.032-.051-3.032s1.98 2.571 3.043 1.694c.809-.668-.473-3.229-.473-3.229s1.729 1.499 2.757.944c1.258-.679-.187-4.614-10.079-10.627-9.896-6.018-12.578-6.94-12.814-9.626 0 0-.004-.135.004-.366.077-.593.414-1.847 1.852-1.712 2.141.346 4.348.531 6.608.531 2.587 0 5.107-.237 7.536-.69l.001.003s.127-.025.164-.031c.284-.036.838-.018.84.671-.09.873-.331 1.751-.845 2.519-1.447 2.168-.972 2.466.54 3.859.933.859 5.211 4.622 11.07 8.264.012.009.017.016.031.023 1.249.752 3.41 2.816 3.41 2.816v-.001c2.428 2.466 6.894 6.596 9.327 6.347 1.646-.168.306-3.002.306-3.002s2.078 2.006 3.099 1.416c1.142-.659-.474-2.755-.474-2.755s1.338.708 2.283.473c.948-.236 1.185-2.644-8.656-8.737z"/><path d="M117.631 83.452c-1.181 0-2.161.355-2.912 1.057-.76.71-1.144 1.531-1.144 2.438v16.056c0 2.154-.382 3.742-1.135 4.721-.728.946-1.892 1.406-3.556 1.406-1.703 0-2.863-.457-3.549-1.396-.716-.979-1.078-2.571-1.078-4.731V86.884c0-1.098-.5-1.996-1.448-2.596-1.289-.812-2.57-1.105-4.129-.587-.476.159-.924.366-1.333.615-.435.265-.802.597-1.093.985-.322.432-.486.901-.486 1.396v16.307c0 2.158-.363 3.75-1.079 4.73-.688.939-1.849 1.396-3.548 1.396-1.705 0-2.877-.459-3.584-1.401-.734-.979-1.107-2.57-1.107-4.726V86.947c0-.908-.384-1.728-1.145-2.438-.751-.702-1.751-1.057-2.973-1.057-1.258 0-2.296.352-3.085 1.045-.811.71-1.222 1.535-1.222 2.45v15.806c0 1.988.194 3.869.575 5.588.393 1.758 1.077 3.3 2.035 4.586.968 1.299 2.282 2.323 3.906 3.05 1.607.716 3.617 1.079 5.975 1.079 2.457 0 4.515-.455 6.115-1.354 1.342-.754 2.473-1.744 3.371-2.951.866 1.207 1.971 2.197 3.294 2.95 1.58.899 3.669 1.354 6.211 1.354 2.357 0 4.359-.364 5.947-1.081 1.601-.726 2.902-1.751 3.872-3.048.96-1.29 1.645-2.833 2.034-4.586.381-1.719.575-3.6.575-5.588V86.947c0-.911-.398-1.733-1.184-2.445-.767-.697-1.818-1.05-3.12-1.05z"/></svg>
diff --git a/modules/private/websites/tools/tools/landing/ldap_password.php b/modules/private/websites/tools/tools/landing/ldap_password.php
new file mode 100644
index 0000000..54448a4
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/ldap_password.php
@@ -0,0 +1,137 @@
1<?php
2
3/**
4 * LDAP PHP Change Password Webpage
5 * @author: Matt Rude <http://mattrude.com>
6 * @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/
7 *
8 *
9 * GNU GENERAL PUBLIC LICENSE
10 * Version 2, June 1991
11 *
12 * Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
13 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
14 * Everyone is permitted to copy and distribute verbatim copies
15 * of this license document, but changing it is not allowed.
16 */
17
18$message = array();
19$message_css = "";
20
21function changePassword($user,$oldPassword,$newPassword,$newPasswordCnf){
22 global $message;
23 global $message_css;
24
25 $server = "ldaps://ldap.immae.eu";
26
27 error_reporting(0);
28 $con = ldap_connect($server);
29 ldap_set_option($con, LDAP_OPT_PROTOCOL_VERSION, 3);
30
31 $user_dn = "uid=$user,ou=users,dc=immae,dc=eu";
32
33 if (ldap_bind($con, $user_dn, $oldPassword) === false) {
34 $message[] = "Error E101 - Current Username or Password is wrong.";
35 return false;
36 }
37 if ($newPassword != $newPasswordCnf ) {
38 $message[] = "Error E102 - Your New passwords do not match!";
39 return false;
40 }
41 if (strlen($newPassword) < 6 ) {
42 $message[] = "Error E103 - Your new password is too short.<br/>Your password must be at least 6 characters long.";
43 return false;
44 }
45
46 $salt = substr(str_shuffle(str_repeat('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',4)),0,4);
47 $encoded_newPassword = "{SSHA}" . base64_encode(pack("H*", sha1($newPassword.$salt)).$salt);
48
49 $user_search = ldap_search($con,"dc=immae,dc=eu","(uid=$user)");
50 $auth_entry = ldap_first_entry($con, $user_search);
51
52 $mail_addresses = ldap_get_values($con, $auth_entry, "mail");
53 $given_names = ldap_get_values($con, $auth_entry, "givenName");
54 $mail_address = $mail_addresses[0];
55 $first_name = $given_names[0];
56
57 /* And Finally, Change the password */
58 $entry = array();
59 $entry["userPassword"] = "$encoded_newPassword";
60
61 if (ldap_modify($con,$user_dn,$entry) === false){
62 $error = ldap_error($con);
63 $errno = ldap_errno($con);
64 $message[] = "E201 - Your password cannot be changed, please contact the administrator.";
65 $message[] = "$errno - $error";
66 } else {
67 $message_css = "yes";
68 mail($mail_address,"Password change notice","Dear $first_name,
69Your password on https://tools.immae.eu/ldap_password.php for account $user was just changed.
70If you did not make this change, please contact me.
71If you were the one who changed your password, you may disregard this message.
72
73Thanks
74--
75Immae / Ismaël", "From: " . getenv("CONTACT_EMAIL"));
76 $message[] = "The password for $user has been changed.<br/>An informational email has been sent to $mail_address.<br/>Your new password is now fully active.";
77 }
78}
79
80?>
81<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
82<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
83<head>
84<title>Password Change Page</title>
85<meta name="viewport" content="width=device-width, initial-scale=1" />
86<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" integrity="sha256-2YQRJMXD7pIAPHiXr0s+vlRWA7GYJEK0ARns7k2sbHY=" crossorigin="anonymous" />
87<style type="text/css">
88 body { font-family: Verdana,Arial,Courier New; margin: auto; }
89
90 .msg_yes { margin: 0 auto; text-align: center; color: green; background: #D4EAD4; border: 1px solid green; border-radius: 10px; margin: 2px; }
91 .msg_no { margin: 0 auto; text-align: center; color: red; background: #FFF0F0; border: 1px solid red; border-radius: 10px; margin: 2px; }
92</style>
93<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
94</head>
95<body>
96<div class="container">
97<form action="<?php print $_SERVER['PHP_SELF']; ?>" name="passwordChange" method="post">
98<h3>Password Change Page</h3>
99<?php
100if (isset($_POST["submitted"])) {
101 echo '<div class="row">';
102 changePassword($_POST['username'],$_POST['oldPassword'],$_POST['newPassword1'],$_POST['newPassword2']);
103 global $message_css;
104 if ($message_css == "yes") {
105 echo '<div class="msg_yes">';
106 } else {
107 echo '<div class="msg_no">';
108 $message[] = "Your password was not changed.";
109 }
110 foreach ( $message as $one ) { echo "<p>$one</p>"; }
111 ?></div></div><?php
112} ?>
113 <div class="row">
114 <div class="one-third column"><label for="username">Username</label></div>
115 <div class="two-thirds column"><input id="username" name="username" type="text" autocomplete="off" /></div>
116 </div>
117 <div class="row">
118 <div class="one-third column"><label for="oldPassword">Current password</label></div>
119 <div class="two-thirds column"><input id="oldPassword" name="oldPassword" type="password" /></div>
120 </div>
121 <div class="row">
122 <div class="one-third column"><label for="newPassword1">New password</label></div>
123 <div class="two-thirds column"><input id="newPassword1" name="newPassword1" type="password" /></div>
124 </div>
125 <div class="row">
126 <div class="one-third column"><label for="newPassword2">New password (again)</label></div>
127 <div class="two-thirds column"><input id="newPassword2" name="newPassword2" type="password" /></div>
128 </div>
129 <div class="row">
130 <div class="column">
131 <input name="submitted" type="submit" value="Change Password"/>
132 </div>
133 </div>
134</form>
135</div>
136</body>
137</html>
diff --git a/modules/private/websites/tools/tools/landing/myip.php b/modules/private/websites/tools/tools/landing/myip.php
new file mode 100644
index 0000000..9ec1c6c
--- /dev/null
+++ b/modules/private/websites/tools/tools/landing/myip.php
@@ -0,0 +1 @@
<?php echo $_SERVER['REMOTE_ADDR']; ?>
diff --git a/modules/private/websites/tools/tools/webhooks.nix b/modules/private/websites/tools/tools/webhooks.nix
new file mode 100644
index 0000000..885b68b
--- /dev/null
+++ b/modules/private/websites/tools/tools/webhooks.nix
@@ -0,0 +1,10 @@
1{ lib, env }:
2{
3 keys = lib.attrsets.mapAttrsToList (k: v: {
4 dest = "webapps/webhooks/${k}.php";
5 user = "wwwrun";
6 group = "wwwrun";
7 permissions = "0400";
8 text = v;
9 }) env;
10}