mirror of
https://github.com/nix-community/home-manager
synced 2024-12-18 07:49:48 +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:
parent
1283bf6ebb
commit
0c65bfa3cf
1 changed files with 12 additions and 1 deletions
|
@ -13,7 +13,9 @@ let
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Environment = [
|
Environment = [
|
||||||
"PATH=${lib.makeBinPath (with pkgs; [ openssh git ])}"
|
"PATH=${
|
||||||
|
lib.makeBinPath (with pkgs; [ openssh git ] ++ repo.extraPackages)
|
||||||
|
}"
|
||||||
"GIT_SYNC_DIRECTORY=${repo.path}"
|
"GIT_SYNC_DIRECTORY=${repo.path}"
|
||||||
"GIT_SYNC_COMMAND=${cfg.package}/bin/git-sync"
|
"GIT_SYNC_COMMAND=${cfg.package}/bin/git-sync"
|
||||||
"GIT_SYNC_REPOSITORY=${repo.uri}"
|
"GIT_SYNC_REPOSITORY=${repo.uri}"
|
||||||
|
@ -76,6 +78,15 @@ let
|
||||||
be triggered even without filesystem changes.
|
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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue