2021-01-22 22:13:43 +01:00
|
|
|
{ config, lib, pkgs, ... }: {
|
|
|
|
|
|
|
|
services.nginx.enable = true;
|
2021-09-11 20:56:00 +02:00
|
|
|
services.nginx.virtualHosts.hedgedoc = {
|
2021-02-11 20:43:54 +01:00
|
|
|
listen = [
|
|
|
|
{
|
|
|
|
addr = "0.0.0.0";
|
|
|
|
port = 4443;
|
|
|
|
ssl = true;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
addr = "0.0.0.0";
|
|
|
|
port = 80;
|
|
|
|
ssl = false;
|
|
|
|
}
|
|
|
|
];
|
2021-01-22 22:13:43 +01:00
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
2021-09-11 20:56:00 +02:00
|
|
|
serverName = "md.ingolf-wagner.de";
|
2021-01-22 22:13:43 +01:00
|
|
|
locations."/".extraConfig = ''
|
|
|
|
client_max_body_size 4G;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_pass http://localhost:3091;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-09-11 20:56:00 +02:00
|
|
|
services.hedgedoc = {
|
2021-01-22 22:13:43 +01:00
|
|
|
enable = true;
|
|
|
|
configuration = {
|
|
|
|
allowFreeURL = true;
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
port = 3091;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|