1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 16:27:03 +00:00
nix-darwin/tests/autossh.nix

20 lines
539 B
Nix
Raw Normal View History

2019-06-24 11:43:01 -04:00
{ config, pkgs, ... }:
{
services.autossh.sessions = [
{
name = "foo";
user = "jfelice";
extraArguments = "-i /some/key -T -N bar.eraserhead.net";
}
];
2019-06-24 11:43:01 -04:00
test = ''
plist=${config.out}/Library/LaunchDaemons/org.nixos.autossh-foo.plist
test -f $plist
grep '<string>/bin/wait4path /nix/store &amp;&amp; exec /nix/store/.*/bin/autossh ' $plist
grep '<string>/bin/wait4path /nix/store &amp;&amp; exec.*-i /some/key ' $plist
2019-06-24 11:43:01 -04:00
tr -d '\n\t ' <$plist |grep '<key>KeepAlive</key><true */>'
'';
}