diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 590362d4..4759bca4 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 382de847..ae6ce117 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