nixos-config/nixos/configs/sputnik/codimd.nix

39 lines
689 B
Nix
Raw Normal View History

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;
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
};
services.hedgedoc = {
2021-01-22 22:13:43 +01:00
enable = true;
configuration = {
db = {
dialect = "sqlite";
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
};
};
}