Update sync-script

This commit is contained in:
Johannes Jöns 2023-09-27 19:22:16 +02:00
parent df376a60c8
commit 47d01db277

View file

@ -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 = {