add hedgedoc

This commit is contained in:
Grimmauld 2024-06-14 00:09:10 +02:00
parent 018f85d1d3
commit 50c5c88ed9
4 changed files with 25 additions and 2 deletions

View file

@ -41,7 +41,7 @@ in
{
imports = [
"${nivSources.agenix}/modules/age.nix"
# "${nivSources.nixos-mailserver}/default.nix"
"${nivSources.nixos-mailserver}/default.nix"
"${nivSources.nixos-matrix-modules}/module.nix"
# fixme: ideally we'd not rely on the flake syntax to load the module

View file

@ -18,6 +18,7 @@ in
./mastodon.nix
./nix_cache.nix
./auth.nix
./hedgedoc.nix
];
options.serverConfig =
@ -147,6 +148,11 @@ in
host = "puffer.${domain}";
accessType = "proxy";
};
hedgedoc_host = {
port = 8048;
host = "hedgedoc.${domain}";
accessType = "proxy";
};
tlemap_host = {
port = 8100;
host = "tlemap.${domain}";

View file

@ -7,7 +7,7 @@ in
# services.dovecot2.sieve.extensions = [ "fileinto" ]; # sives break without this for some reason
mailserver = {
enable = true;
# fqdn = vhosts.mail_host.host;
fqdn = vhosts.mail_host.host;
domains = [ domain ];
# A list of all login accounts. To create the password hashes, use

17
modules/hedgedoc.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, ... }:
let
inherit (config.serverConfig) vhosts;
in {
services.hedgedoc = {
enable = true;
settings = {
domain = vhosts.hedgedoc_host.host;
inherit (vhosts.hedgedoc_host) port;
host = "127.0.0.1";
protocolUseSSL = true;
allowEmailRegister = false; # no registrations for now
allowAnonymousEdits = true; # anonymous can edit select files
allowAnonymous = false; # anonymous can't actually create notes
};
};
}