1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(nextcloud): enable onlyoffice

This commit is contained in:
2023-04-18 16:06:52 +02:00
parent 4ae3824663
commit 4fcbe70f5e
3 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
{
pkgs,
config,
...
}: {
services.onlyoffice = {
enable = true;
port = 8111;
hostname = "onlyoffice.kmein.de";
jwtSecretFile = config.age.secrets.onlyoffice-key.path;
};
age.secrets.onlyoffice-key = {
file = ../../secrets/onlyoffice-jwt-key.age;
owner = "onlyoffice";
};
systemd.services.onlyoffice-docservice.serviceConfig.ExecStartPre = [
# otherwise this leads to nginx
# open() "/var/lib/onlyoffice/documentserver/App_Data/cache/files/data/conv_check_1138411943_docx/output.docx" failed (13: Permission denied)
# and mysterious 403 errors
(pkgs.writers.writeDash "make-reachable" ''
chmod a+x /var/lib/onlyoffice/documentserver/
'')
];
services.nginx.virtualHosts.${config.services.onlyoffice.hostname} = {
enableACME = true;
forceSSL = true;
};
}