gerd.hedgedoc: switched to use postgresql instead of sqlite
This commit is contained in:
parent
0201eed966
commit
e54d7373d8
1 changed files with 16 additions and 2 deletions
|
@ -4,6 +4,8 @@ let
|
|||
svc_domain = "hedgedoc.${config.mine.shared.settings.domain}";
|
||||
|
||||
stateDir = config.mine.zfsMounts."rpool/safe/svcs/hedgedoc";
|
||||
|
||||
hedgedoc_user = config.users.users.hedgedoc.name;
|
||||
in {
|
||||
services.hedgedoc = {
|
||||
enable = true;
|
||||
|
@ -14,8 +16,11 @@ in {
|
|||
protocolUseSSL = true;
|
||||
debug = true;
|
||||
uploadsPath = stateDir + "/uploads";
|
||||
db.dialect = "sqlite";
|
||||
db.storage = stateDir + "/db.sqlite";
|
||||
|
||||
db = {
|
||||
dialect = "postgresql";
|
||||
host = "/run/postgresql";
|
||||
};
|
||||
|
||||
# disable annonymous notes, but allow annonymous edits
|
||||
allowAnonymous = false;
|
||||
|
@ -44,6 +49,15 @@ in {
|
|||
systemd.services.hedgedoc.serviceConfig.ReadWritePaths = [ stateDir ];
|
||||
systemd.services.hedgedoc.serviceConfig.EnvironmentFile = config.age.secrets.lldap-bind-user-pass-hedgedoc-env.path;
|
||||
|
||||
# setup postgresql
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ hedgedoc_user ];
|
||||
ensureUsers = [{
|
||||
name = hedgedoc_user;
|
||||
ensureDBOwnership = true;
|
||||
}];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${svc_domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
|
Loading…
Reference in a new issue