ssh: fix sandboxing to support "tailscale ssh"

This commit is contained in:
2025-06-06 08:17:54 +00:00
parent 01438ff7bb
commit aeeed83b8b

View File

@@ -7,6 +7,9 @@ in
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.openssh "ssh";
sandbox.net = "all";
sandbox.whitelistSsh = true;
# sandbox.autodetectCliPaths = "existingFile"; # to support `-o 'UserKnownHostsFile /path/...'`
sandbox.extraPaths = [ "/var/run/tailscale" ]; # `tailscale ssh` invokes ssh in a way that somehow calls _back_ into ts, not clear how.
sandbox.extraHomePaths = [ ".config/tailscale/ssh_known_hosts" ];
suggestedPrograms = [ "ssh-agent" ];
};