1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-25 03:09:47 +01:00

git-sync: allow passing extraPackages to service

Sometimes extra packages are needed to successfully update a
repository, for example, git-sync.
This commit is contained in:
Roberto Abdelkader Martínez Pérez 2023-11-23 19:42:13 +01:00 committed by Mikilio
parent 0c4a97f880
commit a13f6dc6be
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -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.
'';
};
};
});