From 0c65bfa3cf7e8621a6cd3da500f591e2e92a6259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Abdelkader=20Mart=C3=ADnez=20P=C3=A9rez?= Date: Thu, 23 Nov 2023 19:42:13 +0100 Subject: [PATCH] git-sync: allow passing extraPackages to service Sometimes extra packages are needed to successfully update a repository, for example, git-sync. --- modules/services/git-sync.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/services/git-sync.nix b/modules/services/git-sync.nix index a274da8f..2d90d633 100644 --- a/modules/services/git-sync.nix +++ b/modules/services/git-sync.nix @@ -13,7 +13,9 @@ let Service = { Environment = [ - "PATH=${lib.makeBinPath (with pkgs; [ openssh git ])}" + "PATH=${ + lib.makeBinPath (with pkgs; [ openssh git ] ++ repo.extraPackages) + }" "GIT_SYNC_DIRECTORY=${repo.path}" "GIT_SYNC_COMMAND=${cfg.package}/bin/git-sync" "GIT_SYNC_REPOSITORY=${repo.uri}" @@ -76,6 +78,15 @@ let be triggered even without filesystem changes. ''; }; + + extraPackages = mkOption { + type = with types; listOf package; + default = [ ]; + example = literalExpression "with pkgs; [ git-crypt ]"; + description = '' + Extra packages available to git-sync. + ''; + }; }; });