modularized nextcloud cron job

This commit is contained in:
2026-07-13 01:25:16 +10:00
parent 9f59ed4426
commit fac343fa76
2 changed files with 39 additions and 38 deletions
+17 -38
View File
@@ -27,6 +27,7 @@ in
../../modules/tailscale/enable-service.nix
../../modules/rotate-traefik-logs.nix
../../modules/raspi/mount-data.nix
../../modules/nextcloud-cron-job.nix
];
@@ -46,46 +47,24 @@ boot.supportedFilesystems = [ "nfs" ];
services.rpcbind.enable = true;
# fileSystems."/mnt/raspi" = {
# device = "raspberrypi.tail13f623.ts.net:/home/raspi/raspi";
# fsType = "nfs4";
# options = [
# "nofail"
# "_netdev"
# "noatime"
# # Don't mount until first access
# "x-systemd.automount"
# # Unmount after 10 min idle
# "x-systemd.idle-timeout=600"
# # Give the Pi/Tailscale a little time to appear
# "x-systemd.device-timeout=10s"
# # Explicitly use NFSv4.2 if supported
# "nfsvers=4.2"
# ];
# # Create nextcloud cron scheduled task
# systemd.services.nextcloud = {
# description = "Nextcloud scheduled task";
# script = ''${pkgs.bash}/bin/bash ~/docker/services-up.sh --profile nextcloud exec -u 33 nextcloud-webapp php ./cron.php'';
# serviceConfig = {
# Type = "oneshot";
# User = "nixos";
# };
# path = with pkgs; [ docker docker-compose ];
# };
# Create nextcloud cron scheduled task
systemd.services.nextcloud = {
description = "Nextcloud scheduled task";
script = ''${pkgs.bash}/bin/bash ~/docker/services-up.sh --profile nextcloud exec -u 33 nextcloud-webapp php ./cron.php'';
serviceConfig = {
Type = "oneshot";
User = "nixos";
};
path = with pkgs; [ docker docker-compose ];
};
systemd.timers.nextcloud = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "*:0/5";
Persistent = true;
};
};
# systemd.timers.nextcloud = {
# wantedBy = [ "timers.target" ];
# timerConfig = {
# OnCalendar = "*:0/5";
# Persistent = true;
# };
# };
# Create nextcloud cron scheduled task
# systemd.services.docker-prune = {
+22
View File
@@ -0,0 +1,22 @@
{ pkgs, ... }:
{
# Create nextcloud cron scheduled task
systemd.services.nextcloud = {
description = "Nextcloud scheduled task";
script = ''${pkgs.bash}/bin/bash ~/docker/services-up.sh --profile nextcloud exec -u 33 nextcloud-webapp php ./cron.php'';
serviceConfig = {
Type = "oneshot";
User = "nixos";
};
path = with pkgs; [ docker docker-compose ];
};
systemd.timers.nextcloud = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "*:0/5";
Persistent = true;
};
};
}