nixos/discourse: Update plugin documentation
Update the documentation regarding plugins to reflect recent changes. (cherry picked from commit 20548f050e72a789ebbfe413b0fe7aa815e55c27)
This commit is contained in:
parent
09ccf575cd
commit
23c806f963
@ -475,21 +475,16 @@ in
|
|||||||
plugins = lib.mkOption {
|
plugins = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.package;
|
type = lib.types.listOf lib.types.package;
|
||||||
default = [];
|
default = [];
|
||||||
example = ''
|
example = lib.literalExample ''
|
||||||
[
|
with config.services.discourse.package.plugins; [
|
||||||
(pkgs.fetchFromGitHub {
|
discourse-canned-replies
|
||||||
owner = "discourse";
|
discourse-github
|
||||||
repo = "discourse-spoiler-alert";
|
|
||||||
rev = "e200cfa571d252cab63f3d30d619b370986e4cee";
|
|
||||||
sha256 = "0ya69ix5g77wz4c9x9gmng6l25ghb5xxlx3icr6jam16q14dzc33";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
<productname>Discourse</productname> plugins to install as a
|
Plugins to install as part of
|
||||||
list of derivations. As long as a plugin supports the
|
<productname>Discourse</productname>, expressed as a list of
|
||||||
standard install method, packaging it should only require
|
derivations.
|
||||||
fetching its source with an appropriate fetcher.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -262,9 +262,31 @@ services.discourse = {
|
|||||||
<para>
|
<para>
|
||||||
You can install <productname>Discourse</productname> plugins
|
You can install <productname>Discourse</productname> plugins
|
||||||
using the <xref linkend="opt-services.discourse.plugins" />
|
using the <xref linkend="opt-services.discourse.plugins" />
|
||||||
option. As long as a plugin supports the standard install
|
option. Pre-packaged plugins are provided in
|
||||||
method, packaging it should only require fetching its source
|
<literal><your_discourse_package_here>.plugins</literal>. If
|
||||||
with an appropriate fetcher.
|
you want the full suite of plugins provided through
|
||||||
|
<literal>nixpkgs</literal>, you can also set the <xref
|
||||||
|
linkend="opt-services.discourse.package" /> option to
|
||||||
|
<literal>pkgs.discourseAllPlugins</literal>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Plugins can be built with the
|
||||||
|
<literal><your_discourse_package_here>.mkDiscoursePlugin</literal>
|
||||||
|
function. Normally, it should suffice to provide a
|
||||||
|
<literal>name</literal> and <literal>src</literal> attribute. If
|
||||||
|
the plugin has Ruby dependencies, however, they need to be
|
||||||
|
packaged in accordance with the <link
|
||||||
|
xlink:href="https://nixos.org/manual/nixpkgs/stable/#developing-with-ruby">Developing
|
||||||
|
with Ruby</link> section of the Nixpkgs manual and the
|
||||||
|
appropriate gem options set in <literal>bundlerEnvArgs</literal>
|
||||||
|
(normally <literal>gemdir</literal> is sufficient). A plugin's
|
||||||
|
Ruby dependencies are listed in its
|
||||||
|
<filename>plugin.rb</filename> file as function calls to
|
||||||
|
<literal>gem</literal>. To construct the corresponding
|
||||||
|
<filename>Gemfile</filename>, run <command>bundle
|
||||||
|
init</command>, then add the <literal>gem</literal> lines to it
|
||||||
|
verbatim.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -280,7 +302,10 @@ services.discourse = {
|
|||||||
<para>
|
<para>
|
||||||
For example, to add the <link
|
For example, to add the <link
|
||||||
xlink:href="https://github.com/discourse/discourse-spoiler-alert">discourse-spoiler-alert</link>
|
xlink:href="https://github.com/discourse/discourse-spoiler-alert">discourse-spoiler-alert</link>
|
||||||
plugin and disable it by default:
|
and <link
|
||||||
|
xlink:href="https://github.com/discourse/discourse-solved">discourse-solved</link>
|
||||||
|
plugins, and disable <literal>discourse-spoiler-alert</literal>
|
||||||
|
by default:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.discourse = {
|
services.discourse = {
|
||||||
@ -301,13 +326,9 @@ services.discourse = {
|
|||||||
<link linkend="opt-services.discourse.mail.outgoing.passwordFile">passwordFile</link> = "/path/to/smtp_password_file";
|
<link linkend="opt-services.discourse.mail.outgoing.passwordFile">passwordFile</link> = "/path/to/smtp_password_file";
|
||||||
};
|
};
|
||||||
<link linkend="opt-services.discourse.mail.incoming.enable">mail.incoming.enable</link> = true;
|
<link linkend="opt-services.discourse.mail.incoming.enable">mail.incoming.enable</link> = true;
|
||||||
<link linkend="opt-services.discourse.mail.incoming.enable">plugins</link> = [
|
<link linkend="opt-services.discourse.mail.incoming.enable">plugins</link> = with config.services.discourse.package.plugins; [
|
||||||
(pkgs.fetchFromGitHub {
|
discourse-spoiler-alert
|
||||||
owner = "discourse";
|
discourse-solved
|
||||||
repo = "discourse-spoiler-alert";
|
|
||||||
rev = "e200cfa571d252cab63f3d30d619b370986e4cee";
|
|
||||||
sha256 = "0ya69ix5g77wz4c9x9gmng6l25ghb5xxlx3icr6jam16q14dzc33";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
<link linkend="opt-services.discourse.siteSettings">siteSettings</link> = {
|
<link linkend="opt-services.discourse.siteSettings">siteSettings</link> = {
|
||||||
plugins = {
|
plugins = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user