Add gitlab login to hedgedoc

This commit is contained in:
SebastianStork 2025-05-24 15:15:24 +02:00
parent 637670655d
commit 529bf4abec
2 changed files with 28 additions and 12 deletions

View file

@ -26,14 +26,29 @@ in
};
config = lib.mkIf cfg.enable {
sops.secrets."hedgedoc/seb-password" = {
owner = user;
inherit group;
};
sops = {
secrets = {
"hedgedoc/seb-password" = {
owner = user;
inherit group;
};
"hedgedoc/gitlab-auth-secret" = {
owner = user;
inherit group;
};
};
templates."hedgedoc/environment" = {
owner = user;
inherit group;
content = "GITLAB_CLIENTSECRET=${config.sops.placeholder."hedgedoc/gitlab-auth-secret"}";
};
};
services.hedgedoc = {
enable = true;
environmentFile = config.sops.templates."hedgedoc/environment".path;
settings = {
domain = "${cfg.subdomain}.${config.networking.domain}";
inherit (cfg) port;
@ -42,6 +57,11 @@ in
allowEmailRegister = false;
defaultPermission = "limited";
sessionSecret = "$SESSION_SECRET";
gitlab = {
baseURL = "https://code.fbi.h-da.de";
clientID = "dc71d7ec1525ce3b425d7d41d602f67e1a06cef981259605a87841a6be62cc58";
clientSecret = "$GITLAB_CLIENTSECRET";
};
};
};