From 552e3bec1aa286914d0e1c2346258a992f401a20 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 19 Jun 2022 09:29:07 +0200 Subject: [PATCH] Perform git pull before push for the system repo --- modules/periodic.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/periodic.nix b/modules/periodic.nix index 1c7cc88..5ee3bf9 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -88,7 +88,10 @@ in { systemd.user.services.zion-push = { description = "Push zion changes to git"; path = with pkgs; [ git ]; - script = "${pkgs.git}/bin/git -C /home/coolneng/system push"; + script = '' + ${pkgs.git}/bin/git -C /home/coolneng/system pull + ${pkgs.git}/bin/git -C /home/coolneng/system push + ''; serviceConfig.Type = "oneshot"; startAt = "07:00:00"; after = [ "network-online.target" ];