discourse: add mail config and somme plugins
Signed-off-by: Jeltz <jeltz@federez.net>
This commit is contained in:
parent
7c46eed7ed
commit
817aab82b6
4 changed files with 76 additions and 6 deletions
|
@ -1,8 +1,27 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
age.secrets.discourse-key-base = {
|
||||
file = ../secrets/discourse-key-base.age;
|
||||
owner = "discourse";
|
||||
group = "discourse";
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
discourse-shared-edits = pkgs.discourse.mkDiscoursePlugin {
|
||||
name = "discourse-shared-edits";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "discourse";
|
||||
repo = "discourse-shared-edits";
|
||||
rev = "586d7c18d331e6430f696c2b5b57363a1ee07736";
|
||||
sha256 = "sha256-1CrUQvVL7utrzYv4onh48JUYp6GaDSzo+HdxhwpMqxU=";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
age.secrets = {
|
||||
discourse-key-base = {
|
||||
file = ../secrets/discourse-key-base.age;
|
||||
owner = "discourse";
|
||||
group = "discourse";
|
||||
};
|
||||
discourse-mail-password = {
|
||||
file = ../secrets/discourse-mail-password.age;
|
||||
owner = "discourse";
|
||||
group = "discourse";
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresql.package = pkgs.postgresql_13;
|
||||
|
@ -11,8 +30,26 @@
|
|||
enable = true;
|
||||
hostname = "forum.federez.net";
|
||||
secretKeyBaseFile = config.age.secrets.discourse-key-base.path;
|
||||
# TODO(jeltz): mail
|
||||
mail = {
|
||||
outgoing = {
|
||||
serverAddress = "dodecagon.federez.net";
|
||||
port = 465;
|
||||
domain = "federez.net";
|
||||
username = "discourse";
|
||||
authentication = "plain";
|
||||
forceTLS = true;
|
||||
passwordFile = config.age.secrets.discourse-mail-password.path;
|
||||
};
|
||||
notificationEmailAddress = "forum@federez.net";
|
||||
};
|
||||
admin.skipCreate = true;
|
||||
plugins = with config.services.discourse.package.plugins; [
|
||||
discourse-calendar
|
||||
discourse-math
|
||||
discourse-shared-edits
|
||||
discourse-solved
|
||||
discourse-voting
|
||||
];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue