1
0

hosts/web-2: Add md.clerie.de

This commit is contained in:
clerie 2024-04-02 22:14:17 +02:00
parent df6a540281
commit f0d82c45fb
2 changed files with 43 additions and 0 deletions

View File

@ -12,6 +12,7 @@
./drop.nix
./fieldpoc.nix
./gitea.nix
./hedgedoc.nix
./iot-data.nix
./ip.nix
./legal.nix

42
hosts/web-2/hedgedoc.nix Normal file
View File

@ -0,0 +1,42 @@
{ ... }:
{
services.hedgedoc = {
enable = true;
settings = {
domain = "md.clerie.de";
protocolUseSSL = true;
db = {
dialect = "postgres";
host = "/run/postgresql";
};
port = 3835;
host = "::1";
allowEmailRegister = false;
};
};
services.postgresql = {
ensureDatabases = [ "hedgedoc" ];
ensureUsers = [
{
name = "hedgedoc";
ensureDBOwnership = true;
}
];
};
services.nginx.virtualHosts = {
"md.clerie.de" = {
enableACME = true;
forceSSL = true;
locations = {
"/" = {
proxyPass = "http://[::1]:3835";
proxyWebsockets = true;
};
};
};
};
}