diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-15 12:29:50 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-15 12:30:47 +0200 |
commit | 0962f4e8bdfc1ede00c4d8de7e9a1a383283f47a (patch) | |
tree | c35da0ede4ea6306970618075153d9965e4c6579 /nixops/modules/websites/tools/tools/shaarli.nix | |
parent | 4a65e38be86fb755b0ab57027b0d3b7d28c9b096 (diff) | |
download | Nix-0962f4e8bdfc1ede00c4d8de7e9a1a383283f47a.tar.gz Nix-0962f4e8bdfc1ede00c4d8de7e9a1a383283f47a.tar.zst Nix-0962f4e8bdfc1ede00c4d8de7e9a1a383283f47a.zip |
Improve shaarli keys handling
Related issue: https://git.immae.eu/mantisbt/view.php?id=122
Diffstat (limited to 'nixops/modules/websites/tools/tools/shaarli.nix')
-rw-r--r-- | nixops/modules/websites/tools/tools/shaarli.nix | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/nixops/modules/websites/tools/tools/shaarli.nix b/nixops/modules/websites/tools/tools/shaarli.nix index 157c4de..5435181 100644 --- a/nixops/modules/websites/tools/tools/shaarli.nix +++ b/nixops/modules/websites/tools/tools/shaarli.nix | |||
@@ -49,6 +49,7 @@ in rec { | |||
49 | vhostConf = '' | 49 | vhostConf = '' |
50 | Alias /Shaarli "${root}" | 50 | Alias /Shaarli "${root}" |
51 | 51 | ||
52 | Include /run/keys/webapps/tools-shaarli | ||
52 | <Directory "${root}"> | 53 | <Directory "${root}"> |
53 | DirectoryIndex index.php index.htm index.html | 54 | DirectoryIndex index.php index.htm index.html |
54 | Options Indexes FollowSymLinks MultiViews Includes | 55 | Options Indexes FollowSymLinks MultiViews Includes |
@@ -66,16 +67,15 @@ in rec { | |||
66 | group = apache.group; | 67 | group = apache.group; |
67 | permissions = "0700"; | 68 | permissions = "0700"; |
68 | text = '' | 69 | text = '' |
69 | SHAARLI_LDAP_PASSWORD="${env.ldap.password}" | 70 | SetEnv SHAARLI_LDAP_PASSWORD "${env.ldap.password}" |
70 | SHAARLI_LDAP_DN="${env.ldap.dn}" | 71 | SetEnv SHAARLI_LDAP_DN "${env.ldap.dn}" |
71 | SHAARLI_LDAP_HOST="ldaps://${env.ldap.host}" | 72 | SetEnv SHAARLI_LDAP_HOST "ldaps://${env.ldap.host}" |
72 | SHAARLI_LDAP_BASE="${env.ldap.base}" | 73 | SetEnv SHAARLI_LDAP_BASE "${env.ldap.base}" |
73 | SHAARLI_LDAP_FILTER="${env.ldap.search}" | 74 | SetEnv SHAARLI_LDAP_FILTER "${env.ldap.search}" |
74 | ''; | 75 | ''; |
75 | }; | 76 | }; |
76 | phpFpm = rec { | 77 | phpFpm = rec { |
77 | serviceDeps = [ "openldap.service" "tools-shaarli-key.service" ]; | 78 | serviceDeps = [ "openldap.service" ]; |
78 | envFile = "/run/keys/webapps/tools-shaarli"; | ||
79 | basedir = builtins.concatStringsSep ":" [ webRoot varDir ]; | 79 | basedir = builtins.concatStringsSep ":" [ webRoot varDir ]; |
80 | socket = "/var/run/phpfpm/shaarli.sock"; | 80 | socket = "/var/run/phpfpm/shaarli.sock"; |
81 | pool = '' | 81 | pool = '' |
@@ -87,7 +87,6 @@ in rec { | |||
87 | pm = ondemand | 87 | pm = ondemand |
88 | pm.max_children = 60 | 88 | pm.max_children = 60 |
89 | pm.process_idle_timeout = 60 | 89 | pm.process_idle_timeout = 60 |
90 | clear_env = no | ||
91 | 90 | ||
92 | ; Needed to avoid clashes in browser cookies (same domain) | 91 | ; Needed to avoid clashes in browser cookies (same domain) |
93 | php_value[session.name] = ShaarliPHPSESSID | 92 | php_value[session.name] = ShaarliPHPSESSID |