fork/home-manager
git clone https://git.julia.blue/fork/home-manager
221056c5
master
1{ config , ...} : 2 3{ 4services . git-sync = { 5enable = true ; 6package = config . lib . test . mkStubPackage { outPath = "@git-sync@" ; }; 7repositories . test = { 8path = "/a/path" ; 9uri = "git+ssh://user@example.com:/~user/path/to/repo.git" ; 10}; 11}; 12 13test . stubs . openssh = { name = "openssh" ; }; 14 15nmt . script = '' 16serviceFile =home-files/.config/systemd/user/git-sync-test.service 17 18assertFileExists $ serviceFile 19 20serviceFile = $( normalizeStorePaths $ serviceFile ) 21assertFileContent $ serviceFile ${ 22builtins . toFile "expected" '' 23[Install] 24WantedBy=default.target 25 26[Service] 27Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin 28Environment=GIT_SYNC_DIRECTORY=/a/path 29Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync 30Environment=GIT_SYNC_REPOSITORY=git+ssh://user@example.com:/~user/path/to/repo.git 31Environment=GIT_SYNC_INTERVAL=500 32ExecStart=@git-sync@/bin/git-sync-on-inotify 33Restart=on-abort 34 35[Unit] 36Description=Git Sync test 37'' 38} 39'' ; 40}