Updates
This commit is contained in:
parent
0aa12b9901
commit
d8cf663185
2 changed files with 31 additions and 31 deletions
|
@ -88,11 +88,11 @@
|
||||||
osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; };
|
osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; };
|
||||||
milan-linode-01 = libx.deploy { hostname = "milan-linode-01"; };
|
milan-linode-01 = libx.deploy { hostname = "milan-linode-01"; };
|
||||||
framework-server = libx.deploy { hostname = "framework-server"; };
|
framework-server = libx.deploy { hostname = "framework-server"; };
|
||||||
# nuc-server = libx.deploy { hostname = "nuc-server"; };
|
# nuc-server = libx.deploy { hostname = "nuc-server"; };
|
||||||
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; system = "aarch64-linux"; };
|
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; system = "aarch64-linux"; };
|
||||||
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; system = "aarch64-linux"; };
|
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; system = "aarch64-linux"; };
|
||||||
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; };
|
|
||||||
bakersfield-rpi4 = libx.deploy { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; };
|
bakersfield-rpi4 = libx.deploy { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; };
|
||||||
|
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; };
|
||||||
};
|
};
|
||||||
imageConfigurations = {
|
imageConfigurations = {
|
||||||
nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; };
|
nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; };
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
services.cron = {
|
services.cron = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemCronJobs = [
|
systemCronJobs = [
|
||||||
# Backups to nuc-docker01
|
# Backups to nuc-docker01
|
||||||
''0 0 * * * root rsync --delete -avr /Storage/Data/Docker/sysctl.io/ root@nuc-docker01:/Storage/Data/Docker/sysctl.io/''
|
''0 0 * * * root rsync --delete -avr /Storage/Data/Docker/sysctl.io/ root@nuc-docker01:/Storage/Data/Docker/sysctl.io/''
|
||||||
''0 3 * * * root rsync -avr /Storage/Data/Docker/sysctl.io/nextcloud/html/data/albert/files/InstantUpload/ root@nuc-docker01:/Storage/Video/Pictures/InstantUpload/''
|
''0 3 * * * root rsync -avr /Storage/Data/Docker/sysctl.io/nextcloud/html/data/albert/files/InstantUpload/ root@nuc-docker01:/Storage/Video/Pictures/InstantUpload/''
|
||||||
''0 5 * * * root rsync -avr /Storage/Data/Docker/sysctl.io/nextcloud/html/data/albert/files/Wallpapers/ root@nuc-docker01:/Storage/Video/Pictures/Wallpapers''
|
''0 5 * * * root rsync -avr /Storage/Data/Docker/sysctl.io/nextcloud/html/data/albert/files/Wallpapers/ root@nuc-docker01:/Storage/Video/Pictures/Wallpapers''
|
||||||
# Back up the docker containers monthly:
|
# Back up the docker containers monthly:
|
||||||
''@monthly root ssh nuc-docker01 "rm -rf /Storage/Backups/Docker/sysctl.io/*"; for i in $(docker ps --format '{{.Names}}'); do docker export $i | gzip -cf | ssh root@nuc-docker01 "cat > /Storage/Backups/Docker/sysctl.io/$i.tar.gz"; done''
|
''@monthly root ssh nuc-docker01 "rm -rf /Storage/Backups/Docker/sysctl.io/*"; for i in $(docker ps --format '{{.Names}}'); do docker export $i | gzip -cf | ssh root@nuc-docker01 "cat > /Storage/Backups/Docker/sysctl.io/$i.tar.gz"; done''
|
||||||
# Set a random Pi-Hole password
|
# Set a random Pi-Hole password
|
||||||
''* * * * * root docker exec pihole sudo pihole -a -p $(openssl rand -hex 128)''
|
''* * * * * root docker exec pihole sudo pihole -a -p $(openssl rand -hex 128)''
|
||||||
# Run the ClamAV scan
|
# Run the ClamAV scan
|
||||||
''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/clamscan-cron.sh''
|
''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/clamscan-cron.sh''
|
||||||
# Archive Loki logs monthly
|
# Archive Loki logs monthly
|
||||||
''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/backup-logs.sh >> /Storage/Data/Temporary/log_backups.log''
|
''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/backup-logs.sh >> /Storage/Data/Temporary/log_backups.log''
|
||||||
# Run the Nextcloud cronjobs hourly
|
# Run the Nextcloud cronjobs hourly
|
||||||
''@hourly root docker exec -uwww-data nextcloud php -f /var/www/html/cron.php''
|
''@hourly root docker exec -uwww-data nextcloud php -f /var/www/html/cron.php''
|
||||||
# Run the Pixelfed scheduler
|
# Run the Pixelfed scheduler
|
||||||
''* * * * * root docker exec pixelfed-app php artisan schedule:run''
|
''* * * * * root docker exec pixelfed-app php artisan schedule:run''
|
||||||
# Update / CLean Mastodon caches
|
# Update / CLean Mastodon caches
|
||||||
''@daily root docker exec mastodon-web tootctl preview_cards remove --days 7''
|
''@daily root docker exec mastodon-web tootctl preview_cards remove --days 7''
|
||||||
''@daily root docker exec mastodon-web tootctl media remove --days 7 --prune-profiles''
|
''@daily root docker exec mastodon-web tootctl media remove --days 7 --prune-profiles''
|
||||||
''@daily root docker exec mastodon-web tootctl accounts prune''
|
''@daily root docker exec mastodon-web tootctl accounts prune''
|
||||||
''@daily root docker exec mastodon-web tootctl statuses remove --days 7''
|
''@daily root docker exec mastodon-web tootctl statuses remove --days 7''
|
||||||
''@daily root docker exec mastodon-web tootctl media remove --remove-headers --include-follows --days 7''
|
''@daily root docker exec mastodon-web tootctl media remove --remove-headers --include-follows --days 7''
|
||||||
''@daily root docker exec mastodon-web tootctl preview_cards remove --days 7''
|
''@daily root docker exec mastodon-web tootctl preview_cards remove --days 7''
|
||||||
''@daily root docker exec mastodon-web tootctl media remove-orphans''
|
''@daily root docker exec mastodon-web tootctl media remove-orphans''
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# Old crontab:
|
# Old crontab:
|
||||||
# # At reboot, apply the ip_tables modprobe so Wireguard works
|
# # At reboot, apply the ip_tables modprobe so Wireguard works
|
||||||
|
|
Loading…
Reference in a new issue