From 71b0b70bee3f34973c5183b8b7c17d7184cb5c35 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 23 Jun 2024 08:05:34 +0200 Subject: [PATCH] moved data --- nextcloud.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/nextcloud.nix b/nextcloud.nix index 1a09e65..925b336 100644 --- a/nextcloud.nix +++ b/nextcloud.nix @@ -8,17 +8,17 @@ in environment.systemPackages = [ nextcloud ]; - systemd.timers."nextcloud-backup" = { + systemd.timers."nextcloud-db-backup" = { wantedBy = [ "timers.target" ]; timerConfig = { # OnBootSec = "5m"; # OnUnitActiveSec = "5m"; OnCalendar="*-*-* 2:00:00"; - Unit = "nextcloud-backup.service"; + Unit = "nextcloud-db-backup.service"; }; }; - systemd.services."nextcloud-backup" = { + systemd.services."nextcloud-db-backup" = { script = with pkgs; '' set -eu ${postgresql}/bin/pg_dump "nextcloud" | ${openssh}/bin/ssh -i /etc/nixos/.secrets/tulpan Glenn@nas "cat - > back/nextcloud/latest.sql" @@ -28,8 +28,16 @@ in User = "postgres"; }; }; + services = { + # restic = { + # "nextcloud-repo" = { + # passwordFile = "/etc/nixos/.secrets/restic_pw"; + # }; + # }; + + nginx.virtualHosts = { ${domain} = { forceSSL = true; @@ -48,6 +56,8 @@ in # Let NixOS install and configure the database automatically. database.createLocally = true; # Increase the maximum file upload size. + datadir="/pool/var/lib/nextcloud"; + maxUploadSize = "16G"; https = true; autoUpdateApps.enable = true;