moved data
This commit is contained in:
parent
55d9a9e9f9
commit
71b0b70bee
|
@ -8,17 +8,17 @@ in
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
nextcloud
|
nextcloud
|
||||||
];
|
];
|
||||||
systemd.timers."nextcloud-backup" = {
|
systemd.timers."nextcloud-db-backup" = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
# OnBootSec = "5m";
|
# OnBootSec = "5m";
|
||||||
# OnUnitActiveSec = "5m";
|
# OnUnitActiveSec = "5m";
|
||||||
OnCalendar="*-*-* 2:00:00";
|
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; ''
|
script = with pkgs; ''
|
||||||
set -eu
|
set -eu
|
||||||
${postgresql}/bin/pg_dump "nextcloud" | ${openssh}/bin/ssh -i /etc/nixos/.secrets/tulpan Glenn@nas "cat - > back/nextcloud/latest.sql"
|
${postgresql}/bin/pg_dump "nextcloud" | ${openssh}/bin/ssh -i /etc/nixos/.secrets/tulpan Glenn@nas "cat - > back/nextcloud/latest.sql"
|
||||||
|
@ -29,7 +29,15 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
# restic = {
|
||||||
|
# "nextcloud-repo" = {
|
||||||
|
# passwordFile = "/etc/nixos/.secrets/restic_pw";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
|
||||||
nginx.virtualHosts = {
|
nginx.virtualHosts = {
|
||||||
${domain} = {
|
${domain} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
@ -48,6 +56,8 @@ in
|
||||||
# Let NixOS install and configure the database automatically.
|
# Let NixOS install and configure the database automatically.
|
||||||
database.createLocally = true;
|
database.createLocally = true;
|
||||||
# Increase the maximum file upload size.
|
# Increase the maximum file upload size.
|
||||||
|
datadir="/pool/var/lib/nextcloud";
|
||||||
|
|
||||||
maxUploadSize = "16G";
|
maxUploadSize = "16G";
|
||||||
https = true;
|
https = true;
|
||||||
autoUpdateApps.enable = true;
|
autoUpdateApps.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue