Add git-sync-pull

This commit is contained in:
Geoffrey Frogeye 2024-01-04 22:10:44 +01:00
parent c7d69cd100
commit 0bc0aaa9bf
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -440,13 +440,20 @@ in
pwgen
(pkgs.writeShellApplication {
name = "git-sync-init";
# runtimeInputs = with pkgs; [ coreutils libnotify ];
text = (lib.strings.concatLines
(map (r: ''[ -d "${r.path}" ] || ${pkgs.git}/bin/git clone "${r.uri}" "${r.path}"'')
(lib.attrsets.attrValues config.services.git-sync.repositories)
)
);
})
(pkgs.writeShellApplication {
name = "git-sync-pull";
text = (lib.strings.concatLines
(map (r: ''(cd "${r.path}"; echo "$PWD"; ${pkgs.git}/bin/git pull || true)'')
(lib.attrsets.attrValues config.services.git-sync.repositories)
)
);
})
# Mail
isync