nixos-config/nixos/configs/sputnik/codimd.nix
2021-09-25 20:28:25 +02:00

41 lines
780 B
Nix

{ config, lib, pkgs, ... }: {
services.nginx.enable = true;
services.nginx.virtualHosts.hedgedoc = {
listen = [
{
addr = "0.0.0.0";
port = 4443;
ssl = true;
}
{
addr = "0.0.0.0";
port = 80;
ssl = false;
}
];
enableACME = true;
addSSL = true;
serverName = "md.ingolf-wagner.de";
locations."/".extraConfig = ''
client_max_body_size 4G;
proxy_set_header Host $host;
proxy_pass http://localhost:3091;
'';
};
services.hedgedoc = {
enable = true;
configuration = {
allowFreeURL = true;
db = {
dialect = "sqlite";
storage = "/var/lib/hedgedoc/db.sqlite";
useCDN = false;
};
port = 3091;
};
};
}