From 365ec5435855ed446c249990c58f32c78724e1c3 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 1 Sep 2022 11:39:47 +0800 Subject: [PATCH] nixbld: install hedgedoc --- nixbld-etc-nixos/configuration.nix | 20 ++++++++++++++++++++ nixbld-etc-nixos/named/m-labs.hk | 1 + 2 files changed, 21 insertions(+) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 590362d..4759bca 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -788,6 +788,13 @@ in forceSSL = true; enableACME = true; }; + "docs.m-labs.hk" = { + forceSSL = true; + enableACME = true; + locations."/".proxyPass = "http://127.0.0.1:9825"; + locations."/socket.io/".proxyPass = "http://127.0.0.1:9825"; + locations."/socket.io/".proxyWebsockets = true; + }; "nmigen.org" = { addSSL = true; enableACME = true; @@ -885,5 +892,18 @@ in config.adminpassFile = "/etc/nixos/secret/nextcloud_pass.txt"; }; + services.hedgedoc = { + enable = true; + configuration.port = 9825; + configuration.domain = "docs.m-labs.hk"; + configuration.protocolUseSSL = true; + configuration.allowEmailRegister = false; + configuration.allowAnonymous = false; + configuration.db = { + dialect = "sqlite"; + storage = "/var/lib/hedgedoc/db.hedgedoc.sqlite"; + }; + }; + system.stateVersion = "21.05"; } diff --git a/nixbld-etc-nixos/named/m-labs.hk b/nixbld-etc-nixos/named/m-labs.hk index 382de84..ae6ce11 100644 --- a/nixbld-etc-nixos/named/m-labs.hk +++ b/nixbld-etc-nixos/named/m-labs.hk @@ -34,6 +34,7 @@ forum CNAME @ perso CNAME @ rt CNAME @ files CNAME @ +docs CNAME @ rpi-1 AAAA 2001:470:f821:1:dea6:32ff:fe8a:6a93 rpi-2 AAAA 2001:470:f821:1:ba27:ebff:fef0:e9e6