mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 18:29:47 +01:00
git-sync: add ssh to path
This fixes automated pushing to repository.
This commit is contained in:
parent
f9a35cacdc
commit
66cc5c7ef9
3 changed files with 11 additions and 2 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -345,7 +345,7 @@ Makefile @thiagokokada
|
||||||
/modules/services/fnott.nix @polykernel
|
/modules/services/fnott.nix @polykernel
|
||||||
/tests/modules/services/fnott @polykernel
|
/tests/modules/services/fnott @polykernel
|
||||||
|
|
||||||
/modules/services/git-sync.nix @IvanMalison
|
/modules/services/git-sync.nix @IvanMalison @cab404
|
||||||
|
|
||||||
/modules/services/gnome-keyring.nix @rycee
|
/modules/services/gnome-keyring.nix @rycee
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ let
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Environment = [
|
Environment = [
|
||||||
|
"PATH=${lib.makeBinPath (with pkgs; [ openssh git ])}"
|
||||||
"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}"
|
||||||
|
@ -65,7 +66,7 @@ let
|
||||||
});
|
});
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.imalison ];
|
meta.maintainers = [ maintainers.imalison maintainers.cab404 ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.git-sync = {
|
services.git-sync = {
|
||||||
|
|
|
@ -11,16 +11,24 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.stubs = {
|
||||||
|
git = { name = "git"; };
|
||||||
|
openssh = { name = "openssh"; };
|
||||||
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
serviceFile=home-files/.config/systemd/user/git-sync-test.service
|
serviceFile=home-files/.config/systemd/user/git-sync-test.service
|
||||||
|
|
||||||
assertFileExists $serviceFile
|
assertFileExists $serviceFile
|
||||||
|
|
||||||
|
serviceFile=$(normalizeStorePaths $serviceFile)
|
||||||
assertFileContent $serviceFile ${
|
assertFileContent $serviceFile ${
|
||||||
builtins.toFile "expected" ''
|
builtins.toFile "expected" ''
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Environment=PATH=/nix/store/00000000000000000000000000000000-openssh/bin:/nix/store/00000000000000000000000000000000-git/bin
|
||||||
Environment=GIT_SYNC_DIRECTORY=/a/path
|
Environment=GIT_SYNC_DIRECTORY=/a/path
|
||||||
Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync
|
Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync
|
||||||
Environment=GIT_SYNC_REPOSITORY=git+ssh://user@example.com:/~user/path/to/repo.git
|
Environment=GIT_SYNC_REPOSITORY=git+ssh://user@example.com:/~user/path/to/repo.git
|
||||||
|
|
Loading…
Reference in a new issue