nyxtumops/domains/openvolt.tk/services/discourse.nix
Jacob Hrbek 8cc1197dda Alpha release on request
Signed-off-by: Jacob Hrbek <kreyren@fsfe.org>
2021-09-05 08:02:09 +02:00

20 lines
1.2 KiB
Nix

{ config, lib, pkgs, ... }: lib.mkIf config.services.discourse.enable {
# FIXME(Krey): Add this configuration only if discourse is enabled
services.discourse = {
hostname = "discourse" + config.networking.fqdn;
admin = {
fullName = "Jacob Hrbek";
username = "kreyren";
# FIXME(Krey): Decide on admin mail
email = "kreyren@fsfe.org";
passwordFile = "/var/db/discourse.db";
};
};
# HOTFIX(Krey): The PostgreSQL version recommended for use with Discourse is 13.3, you're using 11.12. Either update your PostgreSQL package to the correct version or set services.discourse.database.ignorePostgresqlVersion. See https://nixos.org/manual/nixos/stable/index.html#module-postgresql for details on how to upgrade PostgreSQL.
## Note(Krey): The assertion happens https://github.com/NixOS/nixpkgs/blob/7f857f1c32580c056d3b09758f0196a2acae962d/nixos/modules/services/web-apps/discourse.nix#L523, no idea why it's using postgresql_11 by default, needs to be investigated
services.discourse.database.ignorePostgresqlVersion = false;
services.postgresql.enable = true;
# CONTRIB(Krey): The upstream still use postgresql_11 which breaks the discourse build
services.postgresql.package = pkgs.postgresql_13;
}