add hedgedoc
This commit is contained in:
parent
ff0a6b450f
commit
10a5cef823
2 changed files with 37 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
||||||
./minecraft.nix
|
./minecraft.nix
|
||||||
# ./factorio.nix # TODO
|
# ./factorio.nix # TODO
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
|
./hedgedoc.nix
|
||||||
# TODO monitoring
|
# TODO monitoring
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
36
machines/public-cof/hedgedoc.nix
Normal file
36
machines/public-cof/hedgedoc.nix
Normal 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 ];
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue