aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/tools/tools/dokuwiki.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /modules/private/websites/tools/tools/dokuwiki.nix
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
Diffstat (limited to 'modules/private/websites/tools/tools/dokuwiki.nix')
-rw-r--r--modules/private/websites/tools/tools/dokuwiki.nix56
1 files changed, 0 insertions, 56 deletions
diff --git a/modules/private/websites/tools/tools/dokuwiki.nix b/modules/private/websites/tools/tools/dokuwiki.nix
deleted file mode 100644
index aee495a..0000000
--- a/modules/private/websites/tools/tools/dokuwiki.nix
+++ /dev/null
@@ -1,56 +0,0 @@
1{ lib, stdenv, dokuwiki, dokuwiki-plugins }:
2rec {
3 varDir = "/var/lib/dokuwiki";
4 activationScript = {
5 deps = [ "wrappers" ];
6 text = ''
7 if [ ! -d ${varDir} ]; then
8 install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \
9 ${varDir}/animals
10 cp -a ${webRoot}/conf.dist ${varDir}/conf
11 cp -a ${webRoot}/data.dist ${varDir}/data
12 cp -a ${webRoot}/
13 chown -R ${apache.user}:${apache.user} ${varDir}/config ${varDir}/data
14 chmod -R 755 ${varDir}/config ${varDir}/data
15 fi
16 install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions
17 '';
18 };
19 webRoot = dokuwiki.withPlugins (p: [ p.farmer p.todo ]);
20 apache = rec {
21 user = "wwwrun";
22 group = "wwwrun";
23 modules = [ "proxy_fcgi" ];
24 root = webRoot;
25 vhostConf = socket: ''
26 Alias /dokuwiki "${root}"
27 <Directory "${root}">
28 DirectoryIndex index.php
29 <FilesMatch "\.php$">
30 SetHandler "proxy:unix:${socket}|fcgi://localhost"
31 </FilesMatch>
32
33 AllowOverride All
34 Options +FollowSymlinks
35 Require all granted
36 </Directory>
37 '';
38 };
39 phpFpm = rec {
40 serviceDeps = [ "openldap.service" ];
41 basedir = builtins.concatStringsSep ":" (
42 [ webRoot varDir ] ++ webRoot.plugins);
43 pool = {
44 "listen.owner" = apache.user;
45 "listen.group" = apache.group;
46 "pm" = "ondemand";
47 "pm.max_children" = "60";
48 "pm.process_idle_timeout" = "60";
49
50 # Needed to avoid clashes in browser cookies (same domain)
51 "php_value[session.name]" = "DokuwikiPHPSESSID";
52 "php_admin_value[open_basedir]" = "${basedir}:/tmp";
53 "php_admin_value[session.save_path]" = "${varDir}/phpSessions";
54 };
55 };
56}