From 0bc0aaa9bf04b3ddb291fba704b0d622dec954ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Thu, 4 Jan 2024 22:10:44 +0100 Subject: [PATCH] Add git-sync-pull --- hm/common.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hm/common.nix b/hm/common.nix index 21d5501..d52647e 100644 --- a/hm/common.nix +++ b/hm/common.nix @@ -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