Discourse
services.discourse.admin.email
The admin user email address.
Type: string
Example
"admin@example.com"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.admin.fullName
The admin user's full name.
Type: string
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.admin.passwordFile
A path to a file containing the admin user's password.
This should be a string, not a nix path, since nix paths are copied into the world-readable nix store.
Type: path
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.admin.skipCreate
Do not create the admin account, instead rely on other existing admin accounts.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.admin.username
The admin user username.
Type: string
Example
"admin"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.backendSettings
Additional settings to put in the
{file}discourse.conf
file.
Look in the discourse_defaults.conf file in the upstream distribution to find available options.
Setting an option to null
means
“define variable, but leave right-hand side empty”.
Type: attribute set of (null or string or signed integer or boolean or floating point number)
Default
{ }
Example
{max_reqs_per_ip_per_minute = 300;max_reqs_per_ip_per_10_seconds = 60;max_asset_reqs_per_ip_per_10_seconds = 250;max_reqs_per_ip_mode = "warn+block";};
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.database.createLocally
Whether a database should be automatically created on the
local host. Set this to false
if you plan
on provisioning a local database yourself. This has no effect
if {option}services.discourse.database.host
is customized.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.database.host
Discourse database hostname. null
means
“prefer local unix socket connection”.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.database.ignorePostgresqlVersion
Whether to allow other versions of PostgreSQL than the
recommended one. Only effective when
{option}services.discourse.database.createLocally
is enabled.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.database.name
Discourse database name.
Type: string
Default
"discourse"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.database.passwordFile
File containing the Discourse database user password.
This should be a string, not a nix path, since nix paths are copied into the world-readable nix store.
Type: null or path
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.database.pool
Database connection pool size.
Type: signed integer
Default
8
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.database.username
Discourse database user.
Type: string
Default
"discourse"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.enable
Whether to enable Discourse, an open source discussion platform.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.enableACME
Whether an ACME certificate should be used to secure connections to the server.
Type: boolean
Default
true
, unless {option}services.discourse.sslCertificate
and {option}services.discourse.sslCertificateKey
are set.
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.hostname
The hostname to serve Discourse on.
Type: string
Default
config.networking.fqdnOrHostName
Example
"discourse.example.com"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.contactEmailAddress
Email address of key contact responsible for this
site. Used for critical notifications, as well as on the
/about
contact form for urgent matters.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.incoming.apiKeyFile
A file containing the Discourse API key used to add
posts and messages from mail. If left at its default
value null
, one will be automatically
generated.
This should be a string, not a nix path, since nix paths are copied into the world-readable nix store.
Type: null or path
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.incoming.enable
Whether to set up Postfix to receive incoming mail.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.incoming.mailReceiverPackage
The discourse-mail-receiver package to use.
Type: package
Default
pkgs.discourse-mail-receiver
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.incoming.replyEmailAddress
Template for reply by email incoming email address, for example: %{reply_key}@reply.example.com or replies+%{reply_key}@example.com
Type: string
Default
"%{reply_key}@${config.services.discourse.hostname}"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.notificationEmailAddress
The from:
email address used when
sending all essential system emails. The domain specified
here must have SPF, DKIM and reverse PTR records set
correctly for email to arrive.
Type: string
Default
"${if config.services.discourse.mail.incoming.enable then "notifications" else "noreply"}@${config.services.discourse.hostname}"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.authentication
Authentication type to use, see https://api.rubyonrails.org/classes/ActionMailer/Base.html
Type: null or one of "plain", "login", "cram_md5"
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.domain
HELO domain to use for outgoing mail.
Type: string
Default
config.services.discourse.hostname
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.enableStartTLSAuto
Whether to try to use StartTLS.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.forceTLS
Force implicit TLS as per RFC 8314 3.3.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.opensslVerifyMode
How OpenSSL checks the certificate, see https://api.rubyonrails.org/classes/ActionMailer/Base.html
Type: string
Default
"peer"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.passwordFile
A file containing the password of the SMTP server account.
This should be a string, not a nix path, since nix paths are copied into the world-readable nix store.
Type: null or path
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.port
The port of the SMTP server Discourse should use to send email.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default
25
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.serverAddress
The address of the SMTP server Discourse should use to send email.
Type: string
Default
"localhost"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.mail.outgoing.username
The username of the SMTP server.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.nginx.enable
Whether an nginx
virtual host should be
set up to serve Discourse. Only disable if you're planning
to use a different web server, which is not recommended.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.package
The discourse package to use.
Type: package
Default
pkgs.discourse
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.plugins
Plugins to install as part of Discourse, expressed as a list of derivations.
Type: list of package
Default
[ ]
Example
with config.services.discourse.package.plugins; [discourse-canned-repliesdiscourse-github];
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.redis.dbNumber
Redis database number.
Type: signed integer
Default
0
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.redis.host
Redis server hostname.
Type: string
Default
"localhost"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.redis.passwordFile
File containing the Redis password.
This should be a string, not a nix path, since nix paths are copied into the world-readable nix store.
Type: null or path
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.redis.useSSL
Connect to Redis with SSL.
Type: boolean
Default
config.services.discourse.redis.host != "localhost"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.secretKeyBaseFile
The path to a file containing the
secret_key_base
secret.
Discourse uses secret_key_base
to encrypt
the cookie store, which contains session data, and to digest
user auth tokens.
Needs to be a 64 byte long string of hexadecimal characters. You can generate one by running
openssl rand -hex 64 >/path/to/secret_key_base_file
This should be a string, not a nix path, since nix paths are copied into the world-readable nix store.
Type: null or path
Default
null
Example
"/run/keys/secret_key_base"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.sidekiqProcesses
How many Sidekiq processes should be spawned.
Type: signed integer
Default
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.siteSettings
Discourse site settings. These are the settings that can be changed from the UI. This only defines their default values: they can still be overridden from the UI.
Available settings can be found by looking in the site_settings.yml file of the upstream distribution. To find a setting's path, you only need to care about the first two levels; i.e. its category and name. See the example.
Settings containing secret data should be set to an
attribute set containing the attribute
_secret
- a string pointing to a file
containing the value the option should be set to. See the
example to get a better picture of this: in the resulting
{file}config/nixos_site_settings.json
file,
the login.github_client_secret
key will
be set to the contents of the
{file}/run/keys/discourse_github_client_secret
file.
Type: JSON value
Default
{ }
Example
{required = {title = "My Cats";site_description = "Discuss My Cats (and be nice plz)";};login = {enable_github_logins = true;github_client_id = "a2f6dfe838cb3206ce20";github_client_secret._secret = /run/keys/discourse_github_client_secret;};};
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.sslCertificate
The path to the server SSL certificate. Set this to enable SSL.
Type: null or path
Default
null
Example
"/run/keys/ssl.cert"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.sslCertificateKey
The path to the server SSL certificate key. Set this to enable SSL.
Type: null or path
Default
null
Example
"/run/keys/ssl.key"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix
services.discourse.unicornTimeout
Time in seconds before a request to Unicorn times out.
This can be raised if the system Discourse is running on is too slow to handle many requests within 30 seconds.
Type: signed integer
Default
30
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/discourse.nix