This commit is contained in:
xinyangli 2024-07-30 11:31:27 +08:00
parent 2d995896c2
commit 62fe085b31
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
3 changed files with 8 additions and 8 deletions

View file

@ -44,8 +44,8 @@ in
};
};
};
config = {
services.hedgedoc = mkIf cfg.enable {
config = mkIf cfg.enable {
services.hedgedoc = {
enable = true;
environmentFile = cfg.environmentFile;
settings = {
@ -71,13 +71,13 @@ in
defaultPermission = "private";
};
};
services.caddy = mkIf ( cfg.enable && cfg.enable ) {
services.caddy = mkIf cfg.caddy {
enable = true;
virtualHosts."https://${cfg.domain}".extraConfig = ''
reverse_proxy unix/${config.services.hedgedoc.settings.path}
'';
};
users.users.caddy.extraGroups = mkIf ( cfg.enable && cfg.enable ) [ "hedgedoc" ];
users.users.caddy.extraGroups = mkIf cfg.caddy [ "hedgedoc" ];
};
}