Skip to content

Commit

Permalink
hosts (srv-test-2): Run nextcloud-sync nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
britter committed Dec 4, 2024
1 parent 3992318 commit a5990dc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions systems/x86_64-linux/srv-test-2/nextcloud-sync.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
config,
lib,
pkgs,
...
}: let
Expand Down Expand Up @@ -36,4 +37,23 @@ in {
IdentityFile /etc/ssh/ssh_host_ed25519_key
IdentitiesOnly yes
'';

systemd.services.nextcloud-sync = {
description = "Syncronizes the NextCloud installation on srv-prod-2 with the installation on this server";
after = ["network.target"];
wants = ["network.target"];
serviceConfig = {
ExecStart = lib.getExe nextcloud-sync;
Type = "oneshot";
};
};

systemd.timers.nextcloud-sync = {
description = "Timer to run nextcloud-sync service nightly";
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
wantedBy = ["timer.target"];
};
}

0 comments on commit a5990dc

Please sign in to comment.