aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-05-04 00:12:46 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-05-04 00:12:46 +0200
commit4b0a82cc2f4597a11b9275cf156ae9cceffaf44f (patch)
treea384ea0b7a610387f9a9cb8b6de4de58e8dd76b0 /modules
parente9c91c19475ed679676829bfd716e41009b560c8 (diff)
downloadNix-4b0a82cc2f4597a11b9275cf156ae9cceffaf44f.tar.gz
Nix-4b0a82cc2f4597a11b9275cf156ae9cceffaf44f.tar.zst
Nix-4b0a82cc2f4597a11b9275cf156ae9cceffaf44f.zip
Fix some etherpad-lite modules and packaging
The upgrade to 1.8.3 broke many modules, which were patched to continue working correctly. This commit also reworks the module system, making it similar to python’s withPackages.
Diffstat (limited to 'modules')
-rw-r--r--modules/private/websites/tools/ether/default.nix15
-rw-r--r--modules/webapps/etherpad-lite.nix6
2 files changed, 19 insertions, 2 deletions
diff --git a/modules/private/websites/tools/ether/default.nix b/modules/private/websites/tools/ether/default.nix
index a0329ef..3350a4a 100644
--- a/modules/private/websites/tools/ether/default.nix
+++ b/modules/private/websites/tools/ether/default.nix
@@ -125,6 +125,10 @@ in {
125 "defaultLang": "fr" 125 "defaultLang": "fr"
126 } 126 }
127 }, 127 },
128 "ep_comments_page": {
129 "displayCommentAsIcon": true,
130 "highlightSelectedText": true
131 },
128 "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"], 132 "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
129 "loadTest": false, 133 "loadTest": false,
130 "indentationOnNewLine": false, 134 "indentationOnNewLine": false,
@@ -152,7 +156,16 @@ in {
152 ]; 156 ];
153 services.etherpad-lite = { 157 services.etherpad-lite = {
154 enable = true; 158 enable = true;
155 modules = builtins.attrValues pkgs.webapps.etherpad-lite-modules; 159 package = pkgs.webapps.etherpad-lite.withModules (p: [
160 p.ep_align p.ep_bookmark p.ep_colors p.ep_comments_page
161 p.ep_cursortrace p.ep_delete_empty_pads p.ep_embedmedia
162 p.ep_font_size p.ep_headings2 p.ep_immae_buttons p.ep_ldapauth
163 p.ep_line_height p.ep_markdown p.ep_mypads p.ep_page_view
164 p.ep_previewimages p.ep_ruler p.ep_scrollto
165 p.ep_set_title_on_pad p.ep_subscript_and_superscript
166 p.ep_timesliderdiff
167 ]);
168 modules = [];
156 sessionKeyFile = "/var/secrets/webapps/tools-etherpad-sessionkey"; 169 sessionKeyFile = "/var/secrets/webapps/tools-etherpad-sessionkey";
157 apiKeyFile = "/var/secrets/webapps/tools-etherpad-apikey"; 170 apiKeyFile = "/var/secrets/webapps/tools-etherpad-apikey";
158 configFile = "/var/secrets/webapps/tools-etherpad"; 171 configFile = "/var/secrets/webapps/tools-etherpad";
diff --git a/modules/webapps/etherpad-lite.nix b/modules/webapps/etherpad-lite.nix
index 7f0e2ed..2e09952 100644
--- a/modules/webapps/etherpad-lite.nix
+++ b/modules/webapps/etherpad-lite.nix
@@ -57,18 +57,22 @@ in
57 description = '' 57 description = ''
58 Etherpad lite package to use. 58 Etherpad lite package to use.
59 ''; 59 '';
60 example = lib.literalExample ''
61 pkgs.webapps.etherpad-lite.withModules (p: [ p.ep_align ]);
62 '';
60 }; 63 };
61 modules = lib.mkOption { 64 modules = lib.mkOption {
62 type = lib.types.listOf lib.types.package; 65 type = lib.types.listOf lib.types.package;
63 default = []; 66 default = [];
64 description = '' 67 description = ''
65 Etherpad lite modules to use. 68 Etherpad lite modules to use.
69 DEPRECATED: use package directly
66 ''; 70 '';
67 }; 71 };
68 # Output variables 72 # Output variables
69 workdir = lib.mkOption { 73 workdir = lib.mkOption {
70 type = lib.types.package; 74 type = lib.types.package;
71 default = cfg.package.withModules cfg.modules; 75 default = cfg.package.withModules (_: cfg.modules);
72 description = '' 76 description = ''
73 Adjusted Etherpad lite package with plugins 77 Adjusted Etherpad lite package with plugins
74 ''; 78 '';