add openoffice to nextcloud
This commit is contained in:
parent
d41b93df43
commit
4e97e2afb6
1 changed files with 35 additions and 0 deletions
|
@ -26,6 +26,12 @@ in
|
|||
description = "Sops file location";
|
||||
example = "secrets/nextcloud.yaml";
|
||||
};
|
||||
|
||||
localNetworkIPRange = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Local network range, to restrict access to the UI to only those IPs.";
|
||||
example = "192.168.1.1/24";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -116,6 +122,35 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.onlyoffice = {
|
||||
enable = true;
|
||||
hostname = "oo.${cfg.domain}";
|
||||
port = 13444;
|
||||
|
||||
postgresHost = "/run/postgresql";
|
||||
|
||||
jwtSecretFile = "/run/secrets/nextcloud/onlyoffice/jwt_secret";
|
||||
};
|
||||
services.nginx.virtualHosts."oo.${cfg.domain}" = {
|
||||
sslCertificate = "/var/lib/acme/${cfg.domain}/cert.pem";
|
||||
sslCertificateKey = "/var/lib/acme/${cfg.domain}/key.pem";
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
allow ${cfg.localNetworkIPRange};
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Secret needed for services.onlyoffice.jwtSecretFile
|
||||
sops.secrets."nextcloud/onlyoffice/jwt_secret" = {
|
||||
inherit (cfg) sopsFile;
|
||||
mode = "0440";
|
||||
owner = "onlyoffice";
|
||||
group = "onlyoffice";
|
||||
restartUnits = [ "onlyoffice-docservice.service" ];
|
||||
};
|
||||
|
||||
# Secret needed for services.nextcloud.config.adminpassFile.
|
||||
sops.secrets."nextcloud/adminpass" = {
|
||||
inherit (cfg) sopsFile;
|
||||
|
|
Loading…
Reference in a new issue