From 1dc8e1109d7540911b24155dedfcc3dbba1eaee5 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Fri, 27 Oct 2023 01:54:41 +0100 Subject: [PATCH] feat: added onlyoffice --- applications/nextcloud.nix | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/applications/nextcloud.nix b/applications/nextcloud.nix index d0f6607..76c0b26 100644 --- a/applications/nextcloud.nix +++ b/applications/nextcloud.nix @@ -56,6 +56,7 @@ in { skynet_acme.domains = [ domain + "onlyoffice.${domain}" ]; skynet_dns.records = [ @@ -64,6 +65,11 @@ in { r_type = "CNAME"; value = cfg.host.name; } + { + record = "onlyoffice.${cfg.domain.sub}"; + r_type = "CNAME"; + value = cfg.host.name; + } ]; # /var/lib/nextcloud/data @@ -94,9 +100,21 @@ in { }; }; - services.nginx.virtualHosts.${domain} = { - forceSSL = true; - useACMEHost = "skynet"; + nixpkgs.config.allowUnfree = true; + services.onlyoffice = { + enable = true; + }; + + services.nginx.virtualHosts = { + ${domain} = { + forceSSL = true; + useACMEHost = "skynet"; + }; + "onlyoffice.${domain}" = { + forceSSL = true; + useACMEHost = "skynet"; + locations."/".proxyPass = "http://127.0.0.1:8000"; + }; }; }; }