Initial commit

This commit is contained in:
2025-08-20 18:24:02 +03:00
commit 2dec42d487
116 changed files with 6591 additions and 0 deletions

36
hosts/cepheus/hedgedoc.nix Executable file
View File

@@ -0,0 +1,36 @@
{ config, ... }:
let
inherit (config.networking) domain;
service_port = 8259;
db = "hedgedoc";
in {
services.hedgedoc = {
# enable = true; # TODO
enable = false;
settings = {
# TODO: kanidm auth
port = service_port;
protocolUseSSL = true;
domain = "pad.${domain}";
host = "127.0.0.1";
allowGravatar = false;
allowPDFExport = true;
dbURL = "postgres://${db}:${db}@localhost:${toString config.services.postgresql.settings.port}/${db}";
allowEmailRegister = false;
allowAnonymous = false;
loglevel = "none";
};
};
imp.dirs = [
{ directory = "/var/lib/hedgedoc"; user = "hedgedoc"; group = "hedgedoc"; mode = "u=rwx,g=rx,o="; }
];
services.caddy.virtualHosts = {
"pad.${domain}".extraConfig = ''
reverse_proxy http://127.0.0.1:${toString service_port}
'';
};
}