2021-12-05 20:57:11 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
domain = "md.ingolf-wagner.de";
|
|
|
|
in
|
|
|
|
{
|
2021-01-22 22:13:43 +01:00
|
|
|
|
|
|
|
services.nginx.enable = true;
|
2021-09-11 20:56:00 +02:00
|
|
|
services.nginx.virtualHosts.hedgedoc = {
|
2021-01-22 22:13:43 +01:00
|
|
|
enableACME = true;
|
2021-12-05 20:57:11 +01:00
|
|
|
forceSSL = true;
|
|
|
|
serverName = domain;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:3091";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
|
|
|
|
#extraConfig = ''
|
|
|
|
# client_max_body_size 4G;
|
|
|
|
#'';
|
|
|
|
};
|
2021-01-22 22:13:43 +01:00
|
|
|
};
|
|
|
|
|
2021-09-11 20:56:00 +02:00
|
|
|
services.hedgedoc = {
|
2021-01-22 22:13:43 +01:00
|
|
|
enable = true;
|
|
|
|
configuration = {
|
|
|
|
db = {
|
|
|
|
dialect = "sqlite";
|
2021-09-11 20:56:00 +02:00
|
|
|
storage = "/var/lib/hedgedoc/db.sqlite";
|
2021-01-22 22:13:43 +01:00
|
|
|
useCDN = false;
|
|
|
|
};
|
2021-12-05 20:57:11 +01:00
|
|
|
allowFreeURL = true;
|
|
|
|
domain = domain;
|
2021-01-22 22:13:43 +01:00
|
|
|
port = 3091;
|
2021-12-05 20:57:11 +01:00
|
|
|
useCDN = false;
|
2021-01-22 22:13:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|