From 5e61113d3e957adaa033a2f2e535e6611d0f5249 Mon Sep 17 00:00:00 2001 From: kalipso Date: Mon, 4 Mar 2024 20:00:32 +0100 Subject: [PATCH] [lucia] add hedgedoc --- machines/lucia/configuration.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/machines/lucia/configuration.nix b/machines/lucia/configuration.nix index 9028e2b5..7d9d05ae 100644 --- a/machines/lucia/configuration.nix +++ b/machines/lucia/configuration.nix @@ -130,6 +130,24 @@ in ympd = { enable = true; }; + + hedgedoc = { + enable = true; + settings = { + allowAnonymousEdits = true; + allowEmailRegister = false; + allowFreeURL = true; + allowOrigin = [ "pad.malobeo.org" ]; + db = { + dialect = "sqlite"; + storage = "/var/lib/hedgedoc/db.hedgedoc.sqlite"; + }; + domain = "pad.malobeo.org"; + port = 3333; + useSSL = false; + protocolUseSSL = true; + }; + }; }; security.acme = { @@ -153,8 +171,19 @@ in proxyWebsockets = true; }; }; + + virtualHosts."pad.malobeo.org" = { + enableACME = true; + forceSSL = true; + acmeRoot = null; + locations."/" = { + proxyPass = "http://127.0.0.1:3333"; + proxyWebsockets = true; + }; + }; }; + networking.firewall.allowedTCPPorts = [ 80 443 ]; environment.systemPackages = with pkgs; [