1 { lib, stdenv, dokuwiki, dokuwiki-plugins }:
3 varDir = "/var/lib/dokuwiki";
7 if [ ! -d ${varDir} ]; then
8 install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \
10 cp -a ${webRoot}/conf.dist ${varDir}/conf
11 cp -a ${webRoot}/data.dist ${varDir}/data
13 chown -R ${apache.user}:${apache.user} ${varDir}/config ${varDir}/data
14 chmod -R 755 ${varDir}/config ${varDir}/data
18 chatonsHostingProperties = {
19 file.datetime = "2022-08-21T22:50:00";
22 description = "DokuWiki is a simple to use and highly versatile Open Source wiki software";
23 website = "https://tools.immae.eu/dokuwiki/";
24 logo = "https://tools.immae.eu/dokuwiki/lib/tpl/dokuwiki/images/apple-touch-icon.png";
27 status.description = "OK";
28 registration.load = "OPEN";
29 install.type = "PACKAGE";
33 file.datetime = "2022-08-21T22:50:00";
36 description = "DokuWiki is a simple to use and highly versatile Open Source wiki software";
37 website = "https://tools.immae.eu/dokuwiki/";
38 logo = "https://tools.immae.eu/dokuwiki/lib/tpl/dokuwiki/images/apple-touch-icon.png";
40 status.description = "OK";
41 registration."" = ["MEMBER" "CLIENT"];
42 registration.load = "OPEN";
43 install.type = "PACKAGE";
47 website = "https://www.dokuwiki.org/dokuwiki";
48 license.url = "http://www.gnu.org/licenses/gpl-2.0.html";
49 license.name = "GNU General Public License Version 2";
50 version = webRoot.version;
51 source.url = "https://download.dokuwiki.org/";
52 modules = map (a: a.pluginName) webRoot.plugins;
55 webRoot = dokuwiki.withPlugins (p: [ p.farmer p.todo ]);
59 modules = [ "proxy_fcgi" ];
61 vhostConf = socket: ''
62 Alias /dokuwiki "${root}"
64 DirectoryIndex index.php
66 SetHandler "proxy:unix:${socket}|fcgi://localhost"
70 Options +FollowSymlinks
76 serviceDeps = [ "openldap.service" ];
77 basedir = builtins.concatStringsSep ":" (
78 [ webRoot varDir ] ++ webRoot.plugins);
80 "listen.owner" = apache.user;
81 "listen.group" = apache.group;
83 "pm.max_children" = "60";
84 "pm.process_idle_timeout" = "60";
86 # Needed to avoid clashes in browser cookies (same domain)
87 "php_value[session.name]" = "DokuwikiPHPSESSID";
88 "php_admin_value[open_basedir]" = "${basedir}:/tmp";
89 "php_admin_value[session.save_handler]" = "redis";
90 "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Tools:Dokuwiki:'";