add hedgedoc

This commit is contained in:
gabriel-doriath-dohler 2021-11-14 23:56:00 +01:00
parent ff0a6b450f
commit 10a5cef823
2 changed files with 37 additions and 0 deletions

View file

@ -12,6 +12,7 @@
./minecraft.nix
# ./factorio.nix # TODO
./nginx.nix
./hedgedoc.nix
# TODO monitoring
];

View file

@ -0,0 +1,36 @@
{ ... }:
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 ];
}