37 lines
684 B
Nix
37 lines
684 B
Nix
|
{ ... }:
|
||
|
let
|
||
|
port = 3000;
|
||
|
in
|
||
|
{
|
||
|
services.hedgedoc = {
|
||
|
enable = true;
|
||
|
configuration = {
|
||
|
protocolUseSSL = true;
|
||
|
# scp =; # TODO
|
||
|
domain = "//docs.beta.rz.ens.wtf";
|
||
|
host = "localhost";
|
||
|
port = port;
|
||
|
db = {
|
||
|
dialect = "sqlite";
|
||
|
storage = "/var/lib/hedgedoc/db.hedgedoc.sqlite";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services.nginx = {
|
||
|
virtualHosts = {
|
||
|
"docs.beta.rz.ens.wtf" = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
locations = {
|
||
|
"/" = {
|
||
|
proxyPass = "http://localhost:${toString port}";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
networking.firewall.allowedTCPPorts = [ 433 80 ];
|
||
|
}
|