From 1425492e19ffd07dc358d0f49ba3ec2643a45098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 28 Oct 2023 02:46:38 +0200 Subject: [PATCH] feat: nextcloud initial commit --- hosts/nachtigall/nextcloud.nix | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 hosts/nachtigall/nextcloud.nix diff --git a/hosts/nachtigall/nextcloud.nix b/hosts/nachtigall/nextcloud.nix new file mode 100644 index 0000000..6206806 --- /dev/null +++ b/hosts/nachtigall/nextcloud.nix @@ -0,0 +1,37 @@ +{ config, pkgs, ... }: +{ + services.caddy.virtualHosts."cloud.pub.solar" = { + # logFormat = lib.mkForce '' + # output discard + # ''; + extraConfig = '' + reverse_proxy :8080 + ''; + }; + + services.nginx.virtualHosts."localhost".listen = [ { addr = "127.0.0.1"; port = 8080; } ]; + + services.nextcloud = { + enable = true; + https = true; + secretFile = ""; # secret + + notify_push = { + enable = true; + }; + + config = { + adminuser = "admin"; + dbuser = "nextcloud"; + dbtype = "pgsql"; + dbname = "nextcloud"; + dbtableprefix = "oc_"; + trustedProxies = [ + "cloud.pub.solar" + ]; + }; + + autoUpdateApps.enable = true; + database.createLocally = true; + }; +}