1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

Fix NIX_SSHOPTS

Closes #302.
This commit is contained in:
Eelco Dolstra 2014-07-24 16:24:57 +02:00
parent 7b351da680
commit 17ef234672
2 changed files with 8 additions and 4 deletions

View file

@ -6,12 +6,16 @@ use IPC::Open2;
our @ISA = qw(Exporter);
our @EXPORT = qw(
@globalSshOpts
readN readInt readString readStrings
writeInt writeString writeStrings
connectToRemoteNix
);
our @globalSshOpts = split ' ', ($ENV{"NIX_SSHOPTS"} or "");
sub readN {
my ($bytes, $from) = @_;
my $res = "";
@ -82,7 +86,7 @@ sub connectToRemoteNix {
# Start nix-store --serve on the remote host.
my ($from, $to);
# FIXME: don't start a shell, start ssh directly.
my $pid = open2($from, $to, "exec ssh -x -a $sshHost @{$sshOpts} nix-store --serve --write $extraFlags");
my $pid = open2($from, $to, "exec ssh -x -a $sshHost @globalSshOpts @{$sshOpts} nix-store --serve --write $extraFlags");
# Do the handshake.
my $SERVE_MAGIC_1 = 0x390c9deb; # FIXME