1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-31 04:04:45 +00:00
nix-darwin/tests/autossh.nix
Ihar Hrachyshka fc4e22f5d4 Use QueueDirectories to wait for /nix/store for keepalived services
This allows to get rid of wait4path and sh from the execution path for
the services. Which simplifies permissions configuration for nix-daemon,
among other things. (No longer needed to grant Full Disk Access / App
Management to /bin/sh for nix-daemon to deal with .app bundles.)

Related: https://github.com/NixOS/nix/issues/6765

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-03-14 22:48:32 -04:00

18 lines
427 B
Nix

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