From f0d942ac060bf350dfd0b6babbada69f0671d6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 30 Apr 2020 17:39:11 +0200 Subject: Add mypads to etherpad --- modules/private/environment.nix | 1 + modules/private/websites/tools/ether/default.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'modules') 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 ldap = mkLdapOptions "Etherpad" { group_filter = mkOption { type = str; description = "Filter for groups"; }; }; + adminPassword = mkOption { type = str; description = "Admin password for mypads / admin"; }; session_key = mkOption { type = str; description = "Session key"; }; api_key = mkOption { type = str; description = "API key"; }; 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 { "percentageToScrollWhenUserPressesArrowUp": 0 }, "users": { + "admin": { + "password": "${env.adminPassword}", + "is_admin": true + }, "ldapauth": { "hash": "invalid", "url": "ldaps://${env.ldap.host}", @@ -104,6 +108,23 @@ in { "anonymousReadonly": false } }, + "ep_mypads": { + "warning": "This hash is stored in database, changing anything here will not have any consequence", + "ldap": { + "url": "ldaps://${env.ldap.host}", + "bindDN": "${env.ldap.dn}", + "bindCredentials": "${env.ldap.password}", + "searchBase": "${env.ldap.base}", + "searchFilter": "${env.ldap.filter}", + "properties": { + "login": "uid", + "email": "mail", + "firstname": "givenName", + "lastname": "sn" + }, + "defaultLang": "fr" + } + }, "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"], "loadTest": false, "indentationOnNewLine": false, -- cgit v1.2.3