Tom Hubrecht
bfe638a8c4
Some checks failed
lint / check (push) Successful in 21s
build configuration / build_web01 (push) Failing after 11m13s
build configuration / build_web02 (push) Failing after 11m13s
build configuration / build_rescue01 (push) Failing after 11m13s
build configuration / build_vault01 (push) Failing after 11m13s
build configuration / build_compute01 (push) Failing after 11m14s
build configuration / build_storage01 (push) Failing after 11m14s
63 lines
1.1 KiB
Nix
63 lines
1.1 KiB
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
host = "pads.dgnum.eu";
|
|
port = 3007;
|
|
in
|
|
{
|
|
services = {
|
|
hedgedoc = {
|
|
enable = true;
|
|
|
|
environmentFile = config.age.secrets."hedgedoc-environment_file".path;
|
|
|
|
settings = {
|
|
inherit port;
|
|
|
|
domain = host;
|
|
host = "127.0.0.1";
|
|
allowOrigin = [ host ];
|
|
|
|
protocolUseSSL = true;
|
|
|
|
allowFreeURL = true;
|
|
|
|
db = {
|
|
dialect = "postgres";
|
|
host = "/run/postgresql";
|
|
};
|
|
};
|
|
};
|
|
|
|
nginx.virtualHosts.${host} = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:${builtins.toString port}";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
|
|
postgresql = {
|
|
enable = true;
|
|
|
|
ensureDatabases = [ "hedgedoc" ];
|
|
|
|
ensureUsers = [
|
|
{
|
|
name = "hedgedoc";
|
|
ensureDBOwnership = true;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
systemd.services.hedgedoc.serviceConfig.StateDirectory = lib.mkForce [
|
|
"hedgedoc"
|
|
"hedgedoc/uploads"
|
|
];
|
|
|
|
dgn-backups.jobs.hedgedoc.settings.paths = [ "/var/lib/hedgedoc" ];
|
|
dgn-backups.postgresDatabases = [ "hedgedoc" ];
|
|
}
|