nixos-config/configs/sputnik/codimd.nix

42 lines
785 B
Nix
Raw Normal View History

2021-01-22 22:13:43 +01:00
{ config, lib, pkgs, ... }: {
services.nginx.enable = true;
services.nginx.virtualHosts.codimd = {
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;
serverName = "codimd.ingolf-wagner.de";
locations."/".extraConfig = ''
client_max_body_size 4G;
proxy_set_header Host $host;
proxy_pass http://localhost:3091;
'';
};
services.codimd = {
enable = true;
configuration = {
allowFreeURL = true;
db = {
dialect = "sqlite";
storage = "/var/lib/codimd/db.codimd.sqlite";
useCDN = false;
};
port = 3091;
};
};
}