From 47d01db27703589c0ec7ce471e7aa44d78f4be52 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 27 Sep 2023 19:22:16 +0200 Subject: [PATCH] Update sync-script --- modules/services/repo-sync/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/services/repo-sync/default.nix b/modules/services/repo-sync/default.nix index 9dbd3f0..f16ba70 100644 --- a/modules/services/repo-sync/default.nix +++ b/modules/services/repo-sync/default.nix @@ -12,10 +12,16 @@ systemd.services."repo-sync" = { script = '' - ${pkgs.git}/bin/git -C /var/lib/repo-sync pull -r codeberg main + ${pkgs.coreutils}/bin/rm -r /var/lib/repo-sync + ${pkgs.git}/bin/git clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/repo-sync + ${pkgs.git}/bin/git -C /var/lib/repo-sync remote add github git@github.com:jopejoe1/nix-conf.git + ${pkgs.git}/bin/git -C /var/lib/repo-sync remote add gitlab git@gitlab.com:jopejoe1/nix-conf.git ${pkgs.git}/bin/git -C /var/lib/repo-sync pull -r github main ${pkgs.git}/bin/git -C /var/lib/repo-sync pull -r gitlab main ${pkgs.git}/bin/git -C /var/lib/repo-sync push origin + ${pkgs.git}/bin/git -C /var/lib/repo-sync push github + ${pkgs.git}/bin/git -C /var/lib/repo-sync push gitlab + ${pkgs.coreutils}/bin/rm -r /var/lib/repo-sync ''; path = [pkgs.openssh]; serviceConfig = {