diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-30 17:39:11 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-30 17:39:11 +0200 |
commit | f0d942ac060bf350dfd0b6babbada69f0671d6bf (patch) | |
tree | cab86e71b9a19aeb3c2f025467b5d5c9c6ec85a4 /modules | |
parent | 840812f2980b77ea93e74666f80a7e0fe5b633eb (diff) | |
download | Nix-f0d942ac060bf350dfd0b6babbada69f0671d6bf.tar.gz Nix-f0d942ac060bf350dfd0b6babbada69f0671d6bf.tar.zst Nix-f0d942ac060bf350dfd0b6babbada69f0671d6bf.zip |
Add mypads to etherpad
Diffstat (limited to 'modules')
-rw-r--r-- | modules/private/environment.nix | 1 | ||||
-rw-r--r-- | modules/private/websites/tools/ether/default.nix | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/modules/private/environment.nix b/modules/private/environment.nix index 0002622..969c9c7 100644 --- a/modules/private/environment.nix +++ b/modules/private/environment.nix | |||
@@ -837,6 +837,7 @@ in | |||
837 | ldap = mkLdapOptions "Etherpad" { | 837 | ldap = mkLdapOptions "Etherpad" { |
838 | group_filter = mkOption { type = str; description = "Filter for groups"; }; | 838 | group_filter = mkOption { type = str; description = "Filter for groups"; }; |
839 | }; | 839 | }; |
840 | adminPassword = mkOption { type = str; description = "Admin password for mypads / admin"; }; | ||
840 | session_key = mkOption { type = str; description = "Session key"; }; | 841 | session_key = mkOption { type = str; description = "Session key"; }; |
841 | api_key = mkOption { type = str; description = "API key"; }; | 842 | api_key = mkOption { type = str; description = "API key"; }; |
842 | redirects = mkOption { type = str; description = "Redirects for apache"; }; | 843 | redirects = mkOption { type = str; description = "Redirects for apache"; }; |
diff --git a/modules/private/websites/tools/ether/default.nix b/modules/private/websites/tools/ether/default.nix index 50446ff..a0329ef 100644 --- a/modules/private/websites/tools/ether/default.nix +++ b/modules/private/websites/tools/ether/default.nix | |||
@@ -88,6 +88,10 @@ in { | |||
88 | "percentageToScrollWhenUserPressesArrowUp": 0 | 88 | "percentageToScrollWhenUserPressesArrowUp": 0 |
89 | }, | 89 | }, |
90 | "users": { | 90 | "users": { |
91 | "admin": { | ||
92 | "password": "${env.adminPassword}", | ||
93 | "is_admin": true | ||
94 | }, | ||
91 | "ldapauth": { | 95 | "ldapauth": { |
92 | "hash": "invalid", | 96 | "hash": "invalid", |
93 | "url": "ldaps://${env.ldap.host}", | 97 | "url": "ldaps://${env.ldap.host}", |
@@ -104,6 +108,23 @@ in { | |||
104 | "anonymousReadonly": false | 108 | "anonymousReadonly": false |
105 | } | 109 | } |
106 | }, | 110 | }, |
111 | "ep_mypads": { | ||
112 | "warning": "This hash is stored in database, changing anything here will not have any consequence", | ||
113 | "ldap": { | ||
114 | "url": "ldaps://${env.ldap.host}", | ||
115 | "bindDN": "${env.ldap.dn}", | ||
116 | "bindCredentials": "${env.ldap.password}", | ||
117 | "searchBase": "${env.ldap.base}", | ||
118 | "searchFilter": "${env.ldap.filter}", | ||
119 | "properties": { | ||
120 | "login": "uid", | ||
121 | "email": "mail", | ||
122 | "firstname": "givenName", | ||
123 | "lastname": "sn" | ||
124 | }, | ||
125 | "defaultLang": "fr" | ||
126 | } | ||
127 | }, | ||
107 | "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"], | 128 | "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"], |
108 | "loadTest": false, | 129 | "loadTest": false, |
109 | "indentationOnNewLine": false, | 130 | "indentationOnNewLine": false, |