mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
ab70a02363
- On darwin, creates a launch agent to run git-sync on an interval and when the `path` changes. - The `uri` option is not used on Darwin. The auto-creation of the local git directory from the `uri` is a feature of the git-sync-on-inotify [1] wrapper (which won't work on Darwin afaik) and not `git-sync` itself. [1] https://github.com/simonthum/git-sync/blob/master/contrib/git-sync-on-inotify
18 lines
462 B
Nix
18 lines
462 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
services.git-sync = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage { outPath = "@git-sync@"; };
|
|
repositories.test = {
|
|
path = "/a/path";
|
|
uri = "git+ssh://user@example.com:/~user/path/to/repo.git";
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
serviceFile=LaunchAgents/org.nix-community.home.git-sync-test.plist
|
|
assertFileExists "$serviceFile"
|
|
assertFileContent "$serviceFile" ${./expected-agent.plist}
|
|
'';
|
|
}
|