workhorse update
This commit is contained in:
parent
d0e13df5be
commit
d3fc857013
3 changed files with 30 additions and 4 deletions
|
@ -259,7 +259,7 @@ in {
|
||||||
priority = 210;
|
priority = 210;
|
||||||
extraConfig = "return 301 $scheme://$host/remote.php/dav;";
|
extraConfig = "return 301 $scheme://$host/remote.php/dav;";
|
||||||
};
|
};
|
||||||
"~ \.(?:css|js|svg|gif)$" = {
|
"~ .(?:css|js|svg|gif)$" = {
|
||||||
proxyPass = "http://nextcloud.workhorse.private$request_uri";
|
proxyPass = "http://nextcloud.workhorse.private$request_uri";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
||||||
|
@ -270,7 +270,7 @@ in {
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"~ \.woff2?$" = {
|
"~ .woff2?$" = {
|
||||||
proxyPass = "http://nextcloud.workhorse.private$request_uri";
|
proxyPass = "http://nextcloud.workhorse.private$request_uri";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
expires 7d; # Cache-Control policy borrowed from `.htaccess`
|
expires 7d; # Cache-Control policy borrowed from `.htaccess`
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
#./mattermost.nix
|
#./mattermost.nix
|
||||||
./borg.nix
|
./borg.nix
|
||||||
./metabase.nix
|
#./metabase.nix
|
||||||
./jupyter.nix
|
#./jupyter.nix
|
||||||
./mysql.nix
|
./mysql.nix
|
||||||
./property.nix
|
./property.nix
|
||||||
./finance.nix
|
./finance.nix
|
||||||
|
|
|
@ -175,6 +175,22 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Backup database
|
||||||
|
# ---------------
|
||||||
|
services.mysqlBackup = {
|
||||||
|
enable = true;
|
||||||
|
databases = config.services.mysql.ensureDatabases;
|
||||||
|
singleTransaction = true;
|
||||||
|
location = "/var/lib/nextcloud/database_backups";
|
||||||
|
};
|
||||||
|
systemd.services."mysql-backup".serviceConfig = {
|
||||||
|
ExecStartPre =
|
||||||
|
[ "+/run/current-system/sw/bin/nextcloud-occ maintenance:mode --on" ];
|
||||||
|
ExecStopPost = [
|
||||||
|
"+/run/current-system/sw/bin/nextcloud-occ maintenance:mode --off"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# in php
|
# in php
|
||||||
services.phpfpm.phpPackage = pkgs.php73;
|
services.phpfpm.phpPackage = pkgs.php73;
|
||||||
|
|
||||||
|
@ -226,6 +242,7 @@ in {
|
||||||
services.SystemdJournal2Gelf.enable = true;
|
services.SystemdJournal2Gelf.enable = true;
|
||||||
services.SystemdJournal2Gelf.graylogServer = "${hostAddress}:11201";
|
services.SystemdJournal2Gelf.graylogServer = "${hostAddress}:11201";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# give containers internet access
|
# give containers internet access
|
||||||
|
@ -261,6 +278,15 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Backup Config
|
||||||
|
# -------------
|
||||||
|
backup.dirs = [
|
||||||
|
"/home/nextcloud/config"
|
||||||
|
"/home/nextcloud/database_backups" # created by mysqlBackup
|
||||||
|
];
|
||||||
|
|
||||||
|
# Backup Files
|
||||||
|
# ------------
|
||||||
services.borgbackup.jobs = {
|
services.borgbackup.jobs = {
|
||||||
"nextcloud-to-media" = {
|
"nextcloud-to-media" = {
|
||||||
repo = "/media/syncthing/borg/nextcloud";
|
repo = "/media/syncthing/borg/nextcloud";
|
||||||
|
|
Loading…
Reference in a new issue