1 { lib, env, stdenv, fetchurl, shaarli }:
3 varDir = "/var/lib/shaarli";
9 install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \
10 ${varDir}/cache ${varDir}/pagecache ${varDir}/tmp ${varDir}/data \
13 webRoot = shaarli varDir;
17 modules = [ "proxy_fcgi" "rewrite" "env" ];
18 webappName = "tools_shaarli";
19 root = "/run/current-system/webapps/${webappName}";
21 Alias /Shaarli "${root}"
23 Include /var/secrets/webapps/tools-shaarli
25 DirectoryIndex index.php index.htm index.html
26 Options Indexes FollowSymLinks MultiViews Includes
30 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
36 dest = "webapps/tools-shaarli";
41 SetEnv SHAARLI_LDAP_PASSWORD "${env.ldap.password}"
42 SetEnv SHAARLI_LDAP_DN "${env.ldap.dn}"
43 SetEnv SHAARLI_LDAP_HOST "ldaps://${env.ldap.host}"
44 SetEnv SHAARLI_LDAP_BASE "${env.ldap.base}"
45 SetEnv SHAARLI_LDAP_FILTER "${env.ldap.filter}"
49 serviceDeps = [ "openldap.service" ];
50 basedir = builtins.concatStringsSep ":" [ webRoot varDir ];
51 socket = "/var/run/phpfpm/shaarli.sock";
55 group = ${apache.group}
56 listen.owner = ${apache.user}
57 listen.group = ${apache.group}
60 pm.process_idle_timeout = 60
62 ; Needed to avoid clashes in browser cookies (same domain)
63 php_value[session.name] = ShaarliPHPSESSID
64 php_admin_value[open_basedir] = "${basedir}:/tmp"
65 php_admin_value[session.save_path] = "${varDir}/phpSessions"