1 { env, etherpad-lite, etherpad-lite-modules, writeText, pkgs }:
3 listenPort = env.listenPort;
4 sessionkey = writeText "SESSIONKEY.txt" env.session_key;
5 apikey = writeText "APIKEY.txt" env.api_key;
8 dest = "webapps/tools-etherpad-apikey";
13 dest = "webapps/tools-etherpad-sessionkey";
15 text = env.session_key;
18 dest = "webapps/tools-etherpad";
21 # Make sure we’re not rebuilding whole libreoffice just because of a
23 let libreoffice = (import <nixpkgs> { overlays = []; }).libreoffice-fresh;
28 "favicon": "favicon.ico",
31 "port" : ${env.listenPort},
32 "showSettingsInAdminPage" : false,
33 "dbType" : "postgres",
35 "user" : "${env.postgresql.user}",
36 "host" : "${env.postgresql.socket}",
37 "password": "${env.postgresql.password}",
38 "database": "${env.postgresql.database}",
42 "defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at http:\/\/etherpad.org\n",
47 "showLineNumbers": true,
48 "useMonospaceFont": false,
52 "alwaysShowChat": false,
53 "chatAndUsers": false,
57 "suppressErrorsInPadText" : false,
58 "requireSession" : false,
60 "sessionNoPassword" : false,
64 "soffice" : "${libreoffice}/bin/soffice",
65 "tidyHtml" : "${pkgs.html-tidy}/bin/tidy",
66 "allowUnknownFileEnds" : true,
67 "requireAuthentication" : false,
68 "requireAuthorization" : false,
70 "disableIPlogging" : false,
71 "automaticReconnectionTimeout" : 0,
72 "scrollWhenFocusLineIsOutOfViewport": {
74 "editionAboveViewport": 0,
75 "editionBelowViewport": 0
78 "scrollWhenCaretIsInTheLastLineOfViewport": false,
79 "percentageToScrollWhenUserPressesArrowUp": 0
83 "url": "ldaps://${env.ldap.host}",
84 "accountBase": "${env.ldap.base}",
85 "accountPattern": "(&(memberOf=cn=users,cn=etherpad,ou=services,dc=immae,dc=eu)(uid={{username}}))",
86 "displayNameAttribute": "cn",
87 "searchDN": "cn=etherpad,ou=services,dc=immae,dc=eu",
88 "searchPWD": "${env.ldap.password}",
89 "groupSearchBase": "${env.ldap.base}",
90 "groupAttribute": "member",
91 "groupAttributeIsDN": true,
93 "groupSearch": "(memberOf=cn=groups,cn=etherpad,ou=services,dc=immae,dc=eu)",
94 "anonymousReadonly": false
97 "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
99 "indentationOnNewLine": false,
102 ["bold", "italic", "underline", "strikethrough"],
103 ["orderedlist", "unorderedlist", "indent", "outdent"],
108 ["importexport", "timeslider", "savedrevision"],
109 ["settings", "embed"],
113 ["timeslider_export", "timeslider_returnToPad"]
117 "logconfig" : { "appenders": [ { "type": "console" } ] }
122 webappDir = etherpad-lite.withModules (builtins.attrValues etherpad-lite-modules);
125 inherit webappDir keys listenPort;