git-sync: add ssh to path

This fixes automated pushing to repository.
This commit is contained in:
cab 2022-08-22 11:40:41 +04:00 committed by Robert Helgesson
parent f9a35cacdc
commit 66cc5c7ef9
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 11 additions and 2 deletions

View file

@ -11,16 +11,24 @@
};
};
test.stubs = {
git = { name = "git"; };
openssh = { name = "openssh"; };
};
nmt.script = ''
serviceFile=home-files/.config/systemd/user/git-sync-test.service
assertFileExists $serviceFile
serviceFile=$(normalizeStorePaths $serviceFile)
assertFileContent $serviceFile ${
builtins.toFile "expected" ''
[Install]
WantedBy=default.target
[Service]
Environment=PATH=/nix/store/00000000000000000000000000000000-openssh/bin:/nix/store/00000000000000000000000000000000-git/bin
Environment=GIT_SYNC_DIRECTORY=/a/path
Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync
Environment=GIT_SYNC_REPOSITORY=git+ssh://user@example.com:/~user/path/to/repo.git