Archived
modularized nextcloud cron job
This commit is contained in:
@@ -27,6 +27,7 @@ in
|
|||||||
../../modules/tailscale/enable-service.nix
|
../../modules/tailscale/enable-service.nix
|
||||||
../../modules/rotate-traefik-logs.nix
|
../../modules/rotate-traefik-logs.nix
|
||||||
../../modules/raspi/mount-data.nix
|
../../modules/raspi/mount-data.nix
|
||||||
|
../../modules/nextcloud-cron-job.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -46,46 +47,24 @@ boot.supportedFilesystems = [ "nfs" ];
|
|||||||
services.rpcbind.enable = true;
|
services.rpcbind.enable = true;
|
||||||
|
|
||||||
|
|
||||||
# fileSystems."/mnt/raspi" = {
|
# # Create nextcloud cron scheduled task
|
||||||
# device = "raspberrypi.tail13f623.ts.net:/home/raspi/raspi";
|
# systemd.services.nextcloud = {
|
||||||
# fsType = "nfs4";
|
# description = "Nextcloud scheduled task";
|
||||||
# options = [
|
# script = ''${pkgs.bash}/bin/bash ~/docker/services-up.sh --profile nextcloud exec -u 33 nextcloud-webapp php ./cron.php'';
|
||||||
# "nofail"
|
# serviceConfig = {
|
||||||
# "_netdev"
|
# Type = "oneshot";
|
||||||
# "noatime"
|
# User = "nixos";
|
||||||
|
# };
|
||||||
# # Don't mount until first access
|
# path = with pkgs; [ docker docker-compose ];
|
||||||
# "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.timers.nextcloud = {
|
||||||
systemd.services.nextcloud = {
|
# wantedBy = [ "timers.target" ];
|
||||||
description = "Nextcloud scheduled task";
|
# timerConfig = {
|
||||||
script = ''${pkgs.bash}/bin/bash ~/docker/services-up.sh --profile nextcloud exec -u 33 nextcloud-webapp php ./cron.php'';
|
# OnCalendar = "*:0/5";
|
||||||
serviceConfig = {
|
# Persistent = true;
|
||||||
Type = "oneshot";
|
# };
|
||||||
User = "nixos";
|
# };
|
||||||
};
|
|
||||||
path = with pkgs; [ docker docker-compose ];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.timers.nextcloud = {
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = "*:0/5";
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create nextcloud cron scheduled task
|
# Create nextcloud cron scheduled task
|
||||||
# systemd.services.docker-prune = {
|
# systemd.services.docker-prune = {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user