aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/tools/ether/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-12 00:24:23 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-20 04:12:27 +0100
commitab8f306d7c2c49b8116e1af7b355ed2384617ed9 (patch)
treed1061ec0436fd096de2332a892eb984c63cb125e /modules/private/websites/tools/ether/default.nix
parent4227853a03923e04daf3dd511a4b5a1ab5d527e7 (diff)
downloadNix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.gz
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.zst
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.zip
Add specification for the private config file as a module.
Diffstat (limited to 'modules/private/websites/tools/ether/default.nix')
-rw-r--r--modules/private/websites/tools/ether/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/private/websites/tools/ether/default.nix b/modules/private/websites/tools/ether/default.nix
index 62a1691..1c56ed7 100644
--- a/modules/private/websites/tools/ether/default.nix
+++ b/modules/private/websites/tools/ether/default.nix
@@ -1,6 +1,6 @@
1{ lib, pkgs, config, myconfig, ... }: 1{ lib, pkgs, config, ... }:
2let 2let
3 env = myconfig.env.tools.etherpad-lite; 3 env = config.myEnv.tools.etherpad-lite;
4 cfg = config.myServices.websites.tools.etherpad-lite; 4 cfg = config.myServices.websites.tools.etherpad-lite;
5 # Make sure we’re not rebuilding whole libreoffice just because of a 5 # Make sure we’re not rebuilding whole libreoffice just because of a
6 # dependency 6 # dependency
@@ -89,15 +89,15 @@ in {
89 "ldapauth": { 89 "ldapauth": {
90 "url": "ldaps://${env.ldap.host}", 90 "url": "ldaps://${env.ldap.host}",
91 "accountBase": "${env.ldap.base}", 91 "accountBase": "${env.ldap.base}",
92 "accountPattern": "(&(memberOf=cn=users,cn=etherpad,ou=services,dc=immae,dc=eu)(uid={{username}}))", 92 "accountPattern": "${env.ldap.filter}",
93 "displayNameAttribute": "cn", 93 "displayNameAttribute": "cn",
94 "searchDN": "cn=etherpad,ou=services,dc=immae,dc=eu", 94 "searchDN": "${env.ldap.dn}",
95 "searchPWD": "${env.ldap.password}", 95 "searchPWD": "${env.ldap.password}",
96 "groupSearchBase": "${env.ldap.base}", 96 "groupSearchBase": "${env.ldap.base}",
97 "groupAttribute": "member", 97 "groupAttribute": "member",
98 "groupAttributeIsDN": true, 98 "groupAttributeIsDN": true,
99 "searchScope": "sub", 99 "searchScope": "sub",
100 "groupSearch": "(memberOf=cn=groups,cn=etherpad,ou=services,dc=immae,dc=eu)", 100 "groupSearch": "${env.ldap.group_filter}",
101 "anonymousReadonly": false 101 "anonymousReadonly": false
102 } 102 }
103 }, 103 },
@@ -155,7 +155,7 @@ in {
155 155
156 RewriteEngine On 156 RewriteEngine On
157 157
158 RewriteMap redirects "txt:${pkgs.writeText "redirects.txt" myconfig.env.tools.etherpad-lite.redirects}" 158 RewriteMap redirects "txt:${pkgs.writeText "redirects.txt" config.myEnv.tools.etherpad-lite.redirects}"
159 RewriteCond %{QUERY_STRING} "!noredirect" 159 RewriteCond %{QUERY_STRING} "!noredirect"
160 RewriteCond %{REQUEST_URI} "^(.*)$" 160 RewriteCond %{REQUEST_URI} "^(.*)$"
161 RewriteCond ''${redirects:$1|Unknown} "!Unknown" 161 RewriteCond ''${redirects:$1|Unknown} "!Unknown"