summaryrefslogtreecommitdiffstats
path: root/lass/2configs/codimd.nix
blob: d29a65210a057e9f9d52a7b470d0f6c30dc95cc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config, pkgs, lib, ... }:
with import <stockholm/lib>;
{
  services.nginx.virtualHosts.codimd = {
    enableACME = true;
    addSSL = true;
    serverName = "codi.lassul.us";
    locations."/".extraConfig = ''
      client_max_body_size 4G;
      proxy_set_header Host $host;
      proxy_pass http://localhost:3091;
    '';
  };

  services.hedgedoc = {
    enable = true;
    configuration.allowOrigin = [ "*" ];
    configuration = {
      db = {
        dialect = "sqlite";
        storage = "/var/lib/codimd/db.codimd.sqlite";
        useCDN = false;
      };
      port = 3091;
    };
  };
}